CSS 第1练 搜索

效果:

<!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>

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。