绝对定位 jquery点击收起,点击显示的标签效果
2012-10-12 10:22
239 查看
http://pc.21edu8.com/html/wangyetexiao/cenghebuju/20120805/15500.html
绝对定位技术实现的标签显示特效,利用jquery点击收起、点击显示的效果,网页打开后,默认是展开的,点击浮动层的底部就会合拢,然后出现另一个控件层,再次点击则展开前一个效果。
绝对定位技术实现的标签显示特效,利用jquery点击收起、点击显示的效果,网页打开后,默认是展开的,点击浮动层的底部就会合拢,然后出现另一个控件层,再次点击则展开前一个效果。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>一个可以收缩展开的页面标签效果</title> <style type="text/css"> ul,li{ margin:0px; padding:0px; list-style:none;} .tagbox{ width:100px; height:auto; border:1px solid #CCCCCC; POSITION:fixed;_position:absolute; _margin-top:expression(document.documentElement.clientHeight-this.style.pixelHeight+document.documentElement.scrollTop); z-index:99; right:0px; bottom:25px; background-color:#FFFFFF; -webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} .tag{ width:80px; height:auto; padding:5px 10px;} .tag span{ width:80px; height:30px; display:block; line-height:30px; color:#006600; font-size:12px;} .tag li{ width:80px; height:24px; line-height:24px; font-size:12px; overflow:hidden;} .tag li a{ color:#336699;} .tag li a:hover{ text-decoration:underline; color: #FF0000;} .guanbi{width:100px; height:26px; background-color: #F0F0F0; line-height:26px; font-size:12px; text-align:center; -webkit-border-radius:0px 0px 5px 5px;-moz-border-radius:0px 0px 5px 5px;border-radius:0px 0px 5px 5px;} .guanbi a{ color:#666666; text-decoration:none;} .zhangkai{ width:20px; height:auto; padding:10px 5px; line-height:20px; font-size:14px; text-align:center;-webkit-border-radius:5px 0px 0px 5px;-moz-border-radius:5px 0px 0px 5px;border-radius:5px 0px 0px 5px; border:1px solid #CCCCCC; POSITION:fixed;_position:absolute; _margin-top:expression(document.documentElement.clientHeight-this.style.pixelHeight+document.documentElement.scrollTop); z-index:100; right:0px; bottom:50px; background-color:#FFFFFF; display:none;} .zhangkai a{color:#006600; text-decoration:none;} .xx{ height:1000px;} </style> <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $(".guanbi a").click(function(){ $(".tagbox").hide(); $(".zhangkai").show(); return false; }); $(".zhangkai").click(function(){ $(".zhangkai").hide(); $(".tagbox").show(500); return false; }); }); </script> </head> <body> <div class="tagbox"> <div class="tag"> <span>热门标签...</span> <ul> <li><a href='/' target="_blank">Ajax</a></li> <li><a href='/' target="_blank">无刷新</a></li> <li><a href='/' target="_blank">EXT</a></li> <li><a href='/' target="_blank">淘宝客</a></li> <li><a href='/' target="_blank">Delphi</a></li> <li><a href='/' target="_blank">治理系统</a></li> <li><a href='/' target="_blank">社区系统</a></li> <li><a href='/' target="_blank">留言本</a></li> <li><a href='/' target="_blank">静态新闻</a></li> </ul> </div> <div class="guanbi"><a href="/" target="_blank">点击封闭</a></div> </div> <div class="zhangkai"><a href="#">热门标签</a></div> <div class="xx"></div> </body> </html>
相关文章推荐
- jquery教程:仿miqike.com首页"热门标签"层绝对定位 点击隐藏/点击显示JS效果
- jquery 在点击的对象边显示绝对定位对象
- Jquery实现多层元素点击结果叠加效果_获取标签内容_叠加实例
- img标签绝对位置定位,图片显示在签名之上。
- A标签绝对定位后IE下不可点击问题
- jQuery实现点击小图显示大图效果
- jquery 自动运行JS 和如何点击标签运行js 及淡入,淡出效果时 如何附加JS函数
- jQuery实现点击后高亮背景固定显示的菜单效果【附demo源码下载】
- 基于jQuery插件实现点击小图显示大图效果
- jQuery点击按钮实现div的隐藏和显示切换效果
- 关于在IE中a标签设置绝对定位和宽高之后却点击没有反应的解决方案
- jQuery - 制作点击显示二级菜单效果
- jquery页面点击激发事件获取属性显示在input标签里面
- jQuery事件 mouseover方法与mouseout方法实现鼠标移进显示移出消失的效果 (css控制span标签)
- 关于绝对定位后元素(a标签)无法点击
- asp.net-元素定位、显示设置、jQuery监听事件和显示效果
- jquery实用代码 - 多标签切换显示内容效果
- jquery页面滚动显示浮动菜单栏锚点定位效果
- jquery特效---点击图片显示大图片效果
- IE中a标签绝对定位设置高宽却无法点击的问题