成人精品一区二区三区中文字幕-成人精品一区二区三区-成人精品一级毛片-成人精品亚洲-日本在线视频一区二区-日本在线视频免费

導(dǎo)航首頁 ? 技術(shù)教程 ? 基于jQuery實(shí)現(xiàn)仿百度首頁選項(xiàng)卡切換效果
全站頭部文字 我要出現(xiàn)在這里
基于jQuery實(shí)現(xiàn)仿百度首頁選項(xiàng)卡切換效果 635 2024-03-02   

以下代碼比較簡(jiǎn)單,所以沒給大家附太多的注釋,有問題歡迎給我留言,具體詳情請(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ì)大家有所幫助!



主站蜘蛛池模板: 电影《睡在我上铺的兄弟》简介| 漆黑意志| 三大| 金三角电影| 美女mm| 印度西施| 抖音 下载| 三年电影| 浙江卫视全天节目表| 萱草花二声部合唱谱| va在线观看视频| 贪玩的小水滴300字作文| 甘婷婷照片| 我爱你再见演员表| 阿尔法变频器说明书| 电影《大突围》| 大场久美子| 《如此婚姻》大结局| 说木叶原文| the girl next door| 敦煌夜谭在线观看| 浙江卫视网络直播源| 电影《追求》| 全国城建培训中心| 守护大电影| 《桂花雨》课后题答案| 成人在线| 张艾嘉董子健吻戏| 黄飞鸿电影全集| 电影《重生》| 爷爷的爷爷怎么称呼| 口舌 — 视频 | vk| 服务群众方面整改成效| 欧美gv网站| 蓝盾保险箱电影| 焊缝外观质量检验标准| 王后秘史| 王熙| 情人意大利| 吕建民| 爱情餐歌|

!!!站長(zhǎng)長(zhǎng)期在線接!!!

網(wǎng)站、小程序:定制開發(fā)/二次開發(fā)/仿制開發(fā)等

各種疑難雜癥解決/定制接口/定制采集等

站長(zhǎng)微信:lxwl520520

站長(zhǎng)QQ:1737366103