jquery教程:仿miqike.com首页"热门标签"层绝对定位 点击隐藏/点击显示JS效果

5 篇文章 0 订阅

jquery教程:仿miqike.com首页"热门标签"层绝对定位 点击隐藏/点击显示JS效果

<!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">康比特</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>
<li><a href='http://www.miqike.com/danbaifen/' target="_blank">乳清蛋白粉</a></li>
<li><a href='/' target="_blank">胸肌锻炼</a></li>
<li><a href='http://www.miqike.com/jianshen/' 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="http://www.miqike.com/tags.php">热门标签</a></div>
<div class="xx"></div>
</body>
</html>


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值