CSS 第1练 搜索
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练 搜索的更多相关文章
- css实现可伸缩的搜索框
效果图: 代码: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" ...
- CSS选择器实现搜索功能 驱动过滤搜索技术
一.CSS选择器可以用来实现搜索功能 CSS选择器可以用来实现搜索功能. 作者以前提过CSS3的选择器结合表单元素可以用来控制元素的显隐,这里,类似的,还是CSS3的选择器,用来过滤和搜索页面元素. ...
- 使用CSS3和jQuery可伸缩的搜索条
使用CSS3和jQuery可伸缩的搜索条 helloweba.com 作者:月光光 时间:2013-12-09 21:23 标签: CSS3 jquery 搜索条在我们网站是必不可少的,尤其是在有限的 ...
- USACO 1.3... 虫洞 解题报告(搜索+强大剪枝+模拟)
这题可真是又让我找到了八数码的感觉...哈哈. 首先,第一次见题,没有思路,第二次看题,感觉是搜索,就这样写下来了. 这题我几乎是一个点一个点改对的(至于为什么是这样,后面给你看一个神奇的东西),让我 ...
- css em单位
本文同时发表在https://github.com/zhangyachen/zhangyachen.github.io/issues/41 为什么要有em 为了弹性布局.更准确的说是界面元素根据浏览器 ...
- 学习animate.css包含了一组炫酷、有趣、跨浏览器的动画
1.animate.css包含了一组炫酷.有趣.跨浏览器的动画,可以在你的项目中直接使用. 第一步:引入animate.css样式文件或者引入某些平台的CDN文件: <head> < ...
- select2 下拉搜索 可编辑可搜索 / 只可搜索
官网 (http://select2.github.io/examples.html) <!--引入select2需要的文件--> <script type="text/j ...
- css在线sprite
大家知道网站图片多,浏览器下载多个图片要有多个请求.可是请求比较耗时,那怎么办呢? 对,方法就是css sprite. 今天我们来看看css在线sprite 百度搜索css-sprite 打开www. ...
- HDU-1043 Eight八数码 搜索问题(bfs+hash 打表 IDA* 等)
题目链接 https://vjudge.net/problem/HDU-1043 经典的八数码问题,学过算法的老哥都会拿它练搜索 题意: 给出每行一组的数据,每组数据代表3*3的八数码表,要求程序复原 ...
随机推荐
- Http协议中Cookie详细介绍
Cookie总是保存在客户端中,按在客户端中的存储位置,可分为内存Cookie和硬盘Cookie.内存Cookie由浏览器维护,保存在内存中,浏览器关闭后就消失了,其存在时间是短暂的.硬盘Cookie ...
- [转载]Huffman编码压缩算法
转自http://coolshell.cn/articles/7459.html 前两天发布那个rsync算法后,想看看数据压缩的算法,知道一个经典的压缩算法Huffman算法.相信大家应该听说过 D ...
- 052——VUE中使用vue-cli初始化单页面应用
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- 终于知道为什么我的mysql总是卸载的不干净以及老是找不到my.ini文件
感谢博主: http://blog.sina.com.cn/s/blog_6fc5bfa90100qmr9.html 如果你的电脑里装过MySQL,想再重新安装MySQL的时候可能就会因为前一版本卸载 ...
- vue2 过渡动画
<body> <div id="app"> <transition name="move"> // transition里面 ...
- hdu5818
题解: 维护两个左偏树 按照左偏树模板来做 代码: #include<cstdio> #include<cmath> #include<algorithm> #in ...
- Java——抽象类、接口
body, table{font-family: 微软雅黑; font-size: 10pt} table{border-collapse: collapse; border: solid gray; ...
- Bayes' theorem (贝叶斯定理)
前言 AI时代的到来一下子让人感觉到数学知识有些捉襟见肘,为了不被这个时代淘汰,我们需要不断的学习再学习.其中最常见的就是贝叶斯定理,这个定理最早由托马斯·贝叶斯提出. 贝叶斯方法的诞生源于他生前为解 ...
- 外汇EA(LRY_FX_Robot_V5)
EA介绍 EA类型是马丁+策略,EA主要功能有风控设置(预付款.浮亏.加仓层数等达到多少进行操作).移动止损(包括隐藏移动止损).帮我操作手动单子(如果你开了首仓不会操作这个功能可参帮你加仓平仓移动止 ...
- secureCRT连不上虚拟机上的ubuntu
前些日子我的secureCRT一直连不上虚拟机上的ubuntu,虽然两边的IP都能ping通! 都怪我当初连ssh都没装就在那瞎弄,执行以下第二步即可连接上了. 如何使用SecureCRT连接ubun ...