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>

2、 菜单:

<style>
#menu { margin: 20px auto 0px auto; width: 100px; height: 50px; background-color: red; }
#menu div { width: 50px; height: 50px; display: block; }
#menu .show_content { position: relative; }
#menu .hide_content { margin-top: 50%; position: absolute; height:50px; width:200px; }
.hide_content ul { float:left; }
.hide_content ul li { float:left;
list-style:none; padding:5px; display:block;border:solid #454141 1px;} </style>
<div id="menu">
<div style="background-color: #4cff00">
<div id="show" class="show_content">
show
<div class="hide_content" style="background-color: #ff6a00; display:none;">
<ul><li>语文</li><li>数学</li><li>代数</li><li>地理</li></ul>
</div>
</div>
</div>
</div>
<div style="background-color: #3629db; width: 100%; height: 30px; display: block;"></div>
<script src="http://common.cnblogs.com/script/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#show").hover(function () {
$(".hide_content").show();
}, function () {
$(".hide_content").hide();
});
});
</script>

  

CSS 第1练 搜索的更多相关文章

  1. css实现可伸缩的搜索框

    效果图: 代码: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" ...

  2. CSS选择器实现搜索功能 驱动过滤搜索技术

    一.CSS选择器可以用来实现搜索功能 CSS选择器可以用来实现搜索功能. 作者以前提过CSS3的选择器结合表单元素可以用来控制元素的显隐,这里,类似的,还是CSS3的选择器,用来过滤和搜索页面元素. ...

  3. 使用CSS3和jQuery可伸缩的搜索条

    使用CSS3和jQuery可伸缩的搜索条 helloweba.com 作者:月光光 时间:2013-12-09 21:23 标签: CSS3 jquery 搜索条在我们网站是必不可少的,尤其是在有限的 ...

  4. USACO 1.3... 虫洞 解题报告(搜索+强大剪枝+模拟)

    这题可真是又让我找到了八数码的感觉...哈哈. 首先,第一次见题,没有思路,第二次看题,感觉是搜索,就这样写下来了. 这题我几乎是一个点一个点改对的(至于为什么是这样,后面给你看一个神奇的东西),让我 ...

  5. css em单位

    本文同时发表在https://github.com/zhangyachen/zhangyachen.github.io/issues/41 为什么要有em 为了弹性布局.更准确的说是界面元素根据浏览器 ...

  6. 学习animate.css包含了一组炫酷、有趣、跨浏览器的动画

    1.animate.css包含了一组炫酷.有趣.跨浏览器的动画,可以在你的项目中直接使用. 第一步:引入animate.css样式文件或者引入某些平台的CDN文件: <head> < ...

  7. select2 下拉搜索 可编辑可搜索 / 只可搜索

    官网 (http://select2.github.io/examples.html) <!--引入select2需要的文件--> <script type="text/j ...

  8. css在线sprite

    大家知道网站图片多,浏览器下载多个图片要有多个请求.可是请求比较耗时,那怎么办呢? 对,方法就是css sprite. 今天我们来看看css在线sprite 百度搜索css-sprite 打开www. ...

  9. HDU-1043 Eight八数码 搜索问题(bfs+hash 打表 IDA* 等)

    题目链接 https://vjudge.net/problem/HDU-1043 经典的八数码问题,学过算法的老哥都会拿它练搜索 题意: 给出每行一组的数据,每组数据代表3*3的八数码表,要求程序复原 ...

随机推荐

  1. Integer与int的种种比较你知道多少

    如果面试官问Integer与int的区别:估计大多数人只会说道两点,Ingeter是int的包装类,int的初值为0,Ingeter的初值为null. 但是如果面试官再问一下Integer i = 1 ...

  2. IOS UI-标签(Label)的高级应用

    // // BWLabel.h // IOS_0119_label // // Created by ma c on 16/1/19. // Copyright © 2016年 博文科技. All r ...

  3. 十款效果惊艳的Html案例(一)

    http://www.html5tricks.com/10-html5-image-effect.html

  4. elasticsearch搜索引擎学习1

    用elasticsearch-river-jdbc同步数据到elasticsearch 用elasticsearch-river-jdbc同步数据到elasticsearch 1 插件安装  插件的g ...

  5. java之double类型数值的比较

    先看demo: public class L26 { /** * @param args */ public static void main(String[] args) { // TODO Aut ...

  6. itembase协同过滤的详细介绍

    ◆版权声明:本文出自胖喵~的博客,转载必须注明出处. 转载请注明出处:https://www.cnblogs.com/by-dream/p/9016289.html 前言 通常我们在网购的时候会遇到这 ...

  7. Toncat-OpenSSL双向认证配置(iOS)

    OpenSSL生成证书 要生成证书的目录下建立几个文件和文件夹,有./demoCA/ ./demoCA/newcerts/ ./demoCA/private/ ./demoCA/index.txt ( ...

  8. 理解HTTP之Content-Type

    http://homeway.me/2015/07/19/understand-http-about-content-type/

  9. Winform工具栏ToolStrip和状态栏StatusStrip

    工具栏和状态栏的设置与前面的菜单基本相似 1.ToolStrip 从工具栏选项卡上拖一个放入窗体即可,位置也是通过其Dock设置的.先上一张图,红色部分就是工具栏,工具栏中可以放置如图下拉菜单中的Bu ...

  10. Python selenium chrome 环境配置

    Python selenium chrome 环境配置 一.参考文章: 1. 记录一下python easy_install和pip安装地址和方法 http://heipark.iteye.com/b ...