码迷,mamicode.com
首页 > Web开发 > 详细

CSS 第1练 搜索

时间:2014-11-22 17:26:00      阅读:200      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   ar   color   os   sp   for   

效果:

bubuko.com,布布扣

<!DOCTYPE HTML>
<html>
<head>
    <meta charset="gbk" />
    <title></title>
    <style>
        * { margin: 0px; padding: 0px; font-size: 12px; }
        .btn_search_all { background-color: #2d58b9; border: solid 1px #2d58b9; }
        .btn_search_goal { background-color: #CC0099; border: solid 1px #CC0099; }
        .searchArea { width: 280px; height: 100px; background-color: #f1f1f1; padding: 10px; }
        .searchArea .search_all { width: 280px; height: 30px; margin-bottom: 10px; overflow: hidden; }
        .searchArea .search_goal { width: 280px; height: 30px; overflow: hidden; margin-bottom: 10px; }
        .searchArea .search_goal p, .searchArea .search_all p { width: 208px; height: 28px; border: 1px #2d58b9 solid; border-right: none; display: block; float: left; }
        .search_text { width: 200px; height: 20px; padding: 4px 4px; float: left; border: 0 none; line-height: 20px; }
        .search_btn { float: left; padding: 5px; color: #fff; width: 68px; height: 30px; border: none; outline: none; resize: none; cursor: pointer; font: 12px/1.5 Verdana,‘Microsoft YaHei‘,Tahoma,‘Simsun‘,sans-serif; word-spacing: 20px; }
        .search_type { padding-top: 5px; }
        .searchArea { margin:50px auto;  }
    </style>
</head>
<body>

    <div class="searchArea">
        <div class="search_all ">
            <p>
                <input type="text" class="search_text" />
            </p>
            <input type="button" class="search_btn btn_search_all" value="全站搜" />
        </div>
        <form id="search_form">
            <div class="search_goal ">
                <p>
                    <input type="text" class="search_text" maxlength="20" />
                </p>
                <input type="button" class="search_btn btn_search_goal" value="精准搜" />
            </div>
            <table width="100%" class="search_type">
                <tbody>
                    <tr>
                        <td>
                            <input name="searchtype" type="radio" id="ss2" value="forum" checked="checked"><label for="ss2">帖子</label></td>
                        <td>
                            <input name="searchtype" type="radio" id="ss1" value="article"><label for="ss1">文章</label></td>
                        <td>
                            <input name="searchtype" type="radio" id="ss3" value="blog"><label for="ss3">笔记</label></td>
                        <td>
                            <input name="searchtype" type="radio" id="ss4" value="group"><label for="ss4">帮派</label></td>
                        <td>
                            <input name="searchtype" type="radio" id="ss5" value="user"><label for="ss5">前端工程师</label></td>
                    </tr>
                </tbody>
            </table>
        </form>
    </div>
</body>
</html>

 

CSS 第1练 搜索

标签:style   blog   http   io   ar   color   os   sp   for   

原文地址:http://www.cnblogs.com/rhythmK/p/4115366.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!