最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

基于jQuery實(shí)現(xiàn)仿百度首頁選項(xiàng)卡切換效果

 更新時(shí)間:2016年05月29日 15:12:42   作者:roucheng  
這篇文章主要介紹了基于jQuery實(shí)現(xiàn)仿百度首頁選項(xiàng)卡切換效果的相關(guān)資料,非常不錯(cuò)具有參考借鑒價(jià)值,需要的朋友可以參考下

以下代碼比較簡單,所以沒給大家附太多的注釋,有問題歡迎給我留言,具體詳情請(qǐng)看下文代碼吧。

先給大家展示下效果圖:

代碼如下:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery仿百度首頁選項(xiàng)卡切換效果 - 何問起</title>
<base target="_blank" />
<style type="text/css">
body {
background: url(http://hovertree.com/texiao/jquery/71/images/65.jpg) no-repeat fixed center center;
}
.hovertreepage .clear {
clear: both;
}
.hovertreepage {
margin: 200px auto 0 auto;
width: 700px;
height: 300px;
}
.hovertreepage .left, .hovertreepage .right {
float: left;
}
.hovertreepage .nav-back {
width: 60px;
height: 300px;
background: #000;
opacity: .3;
filter: alpha(opacity=30);
}
.hovertreepage .nav {
position: relative;
margin-top: -300px;
width: 60px;
text-align: center;
font-size: 14px;
font-family: "微軟雅黑";
color: #fff;
}
.hovertreepage .nav div {
height: 32px;
line-height: 28px;
cursor:pointer;
}
.hovertreepage .nav div.on {
background: #0094ea;
}
.hovertreepage .right {
width: 620px;
height: 300px;
margin-left: 20px;
}
.hovertreepage .content-back {
width: 620px;
height: 300px;
background: #fff;
opacity: .3;
}
.hovertreepage .content {
position: relative;
width: 600px;
height: 280px;
margin-top: -300px;
padding: 10px;
overflow: hidden;
}
.hovertreepage .content a{color:blue;}
.hovertreepage .content div {
width: 600px;
height: 280px;
margin-bottom: 10px;
background: #fff;
}
</style>
</head>
<body>
<div class="hovertreepage">
<div class="left">
<div class="nav-back"></div>
<div class="nav">
<div class="on">導(dǎo)航</div>
<div>新聞</div>
<div>世界杯</div>
<div>音樂</div>
<div>彩票</div>
</div>
</div>
<div class="right">
<div class="content-back"></div>
<div class="content">
<div>1 <a >首頁</a> <a >特效</a> <a >原文</a>
</div>
<div>2 </div>
<div>3 <a >服裝店風(fēng)云</a> 自從接觸編程以后,興趣就一直有增無減。</div>
<div>4 <a >jQuery全部版本下載</a>
時(shí)間就是金錢,效率就是生命。
</div>
<div>5 <a ><img src="http://hovertree.com/hvtimg/bjafjd/wmt3mxd7.png" alt="孫悟空" /></a></div>
</div>
</div>
<div class="clear"></div>
</div>
<script type="text/javascript" src="http://down.hovertree.com/jquery/jquery-1.12.3.min.js"></script>
<script type="text/javascript">
$(".hovertreepage .nav div").mouseenter(function () {
var $this = $(this);
var index = $this.index();
}).mouseleave(function () {
var $this = $(this);
var index = $this.index();
}).click(function () {
var $this = $(this);
var index = $this.index();
var l = -(index * 290);
$(".hove"+"rtreepage .nav div").removeClass("on");
$(".hovertreepage .nav div").eq(index).addClass("on");
$(".hovertreepage .content div:eq(0)").stop().animate({ "margin-top": l }, 500);
});
</script>
</body>
</html>

以上內(nèi)容是小編給大家介紹的基于jQuery實(shí)現(xiàn)仿百度首頁選項(xiàng)卡切換效果,希望對(duì)大家有所幫助!

相關(guān)文章

最新評(píng)論

育儿| 章丘市| 弋阳县| 乌兰察布市| 长汀县| 新营市| 德令哈市| 徐州市| 双牌县| 浏阳市| 屯昌县| 通山县| 滁州市| 东阿县| 塔城市| 尚志市| 黄石市| 鲁甸县| 新蔡县| 黔西县| 乌兰察布市| 陆河县| 武威市| 孝义市| 沿河| 遂溪县| 织金县| 行唐县| 高要市| 阿克苏市| 北海市| 射阳县| 汶川县| 广汉市| 三江| 巴楚县| 梧州市| 东城区| 武安市| 扎赉特旗| 墨脱县|