基于jQuery實現百度應用圖文列表切換



35 136 46



特效描述:基于jQuery實現 百度應用 圖文列表切換,基于jQuery實現百度應用圖文列表切換

代碼結構

1. 引入CSS

<link rel="stylesheet" href="css/zzsc.css" />

2. 引入JS

<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>

3. HTML代碼

<div style="margin:50px auto; width:250px;">
<div class="s-index-side">
<div class="part weekly game-top10 cls">
<div class="title"><h3>游戲Top10</h3><span class="s-index-icon game-top10-icon">icon圖標</span></div>
<ul class="weekly-list cls">
<li>
<div class="app-show-title"><span class="num s-index-org">1.</span><a href="http://51qianduan.com/">植物大戰僵尸2(高清版)</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/1.png" alt="植物大戰僵尸2(高清版)"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="植物大戰僵尸2(高清版)" data-icon="images/1.png" data-type="game" data-size="33461069" data-versionname="1.0.4" data-versioncode="4" data-package="com.popcap.pvz2cthdbddk" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-30" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num s-index-org">2.</span><a href="http://51qianduan.com/">節奏大師</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/2.png" alt="節奏大師"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-6"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="節奏大師" data-icon="images/2.png" data-type="game" data-size="27834715" data-versionname="2.0.4.10" data-versioncode="13" data-package="com.tencent.game.rhythmmaster" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-02" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num s-index-org">3.</span><a href="http://51qianduan.com/">神廟逃亡2</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/3.png" alt="神廟逃亡2"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-9"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="神廟逃亡2" data-icon="images/3.png" data-type="game" data-size="25360687" data-versionname="1.3.2" data-versioncode="4503" data-package="com.imangi.templerun2" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-30" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">4.</span><a href="http://51qianduan.com/">地鐵跑酷</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/4.png" alt="地鐵跑酷"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="地鐵跑酷" data-icon="images/4.png" data-type="game" data-size="21359627" data-versionname="2.10.4" data-versioncode="44" data-package="com.kiloo.subwaysurf" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-30" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">5.</span><a href="http://51qianduan.com/">天天愛消除</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/5.png" alt="天天愛消除"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-7"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="天天愛消除" data-icon="images/5.png" data-type="game" data-size="24309275" data-versionname="1.0.3.0" data-versioncode="11" data-package="com.tencent.peng" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-22" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">6.</span><a href="http://51qianduan.com/">天天酷跑</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/6.png" alt="天天酷跑"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="天天酷跑" data-icon="images/6.png" data-type="game" data-size="31396115" data-versionname="1.0.6.0" data-versioncode="10" data-package="com.tencent.pao" data-download_url="http://www.cqetom.live//data/wisegame/cb148bef52629659/tiantiankupao_10.apk" data-updatetime="2013-09-13" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">7.</span><a href="http://51qianduan.com/">歡樂斗地主(完整版)</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/7.png" alt="歡樂斗地主(完整版)"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-9"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="歡樂斗地主(完整版)" data-icon="images/7.png" data-type="game" data-size="34738978" data-versionname="3.0.102" data-versioncode="32" data-package="com.qqgame.hlddz" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-24" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">8.</span><a href="http://51qianduan.com/">水果忍者</a></div>
<div class="app-show-block">
<a href="http://www.cqetom.live//a/item?docid=3666615&pre=web_am_indexhot&pos=home_2015_7&f=home_2015_7" class="pic"><img src="images/8.png" alt="水果忍者"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="水果忍者" data-icon="images/8.png" data-type="game" data-size="34067302" data-versionname="1.8.6" data-versioncode="1807" data-package="com.halfbrick.fruitninja" data-download_url="http://51qianduan.com/" data-updatetime="2013-10-02" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">9.</span><a href="http://51qianduan.com/">保衛蘿卜</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/9.png" alt="保衛蘿卜"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-9"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="保衛蘿卜" data-icon="images/9.png" data-type="game" data-size="49775047" data-versionname="1.1.1" data-versioncode="258" data-package="com.carrot.carrotfantasy" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-30" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
<li>
<div class="app-show-title"><span class="num">10.</span><a href="http://51qianduan.com/">消滅星星</a></div>
<div class="app-show-block">
<a href="http://51qianduan.com/" class="pic"><img src="images/10.png" alt="消滅星星"><span class="mask mask2"></span></a>
<div class="s-index-star s-index-star-8"><div class="s-index-star-big wrap"><span class="one">&nbsp;</span><span class="two">&nbsp;</span><span class="three">&nbsp;</span><span class="four">&nbsp;</span><span class="five">&nbsp;</span></div></div>
<a href="###" data-sname="消滅星星" data-icon="images/10.png" data-type="game" data-size="2865622" data-versionname="2.0.3" data-versioncode="203" data-package="com.wpd.game.popstar" data-download_url="http://51qianduan.com/" data-updatetime="2013-09-17" class="event-exe-install s-index-down s-index-icon" tjurl="http://51qianduan.com/">安&nbsp;裝</a>
</div>
</li>
</ul>
</div>
</div>
<script type="text/javascript">
$(function(){
$(".weekly-list li").bind("mouseenter",weekly_ani).bind("mouseleave",function(){clearTimeout($(this).data("setTime"));});
function weekly_ani(e){
var me=$(e.target).closest("li");
if(me.hasClass("current")) return;
var orili=me.parent().find(".current");
$(this).data("setTime",setTimeout(function(){weekly_move(me,orili,100,39)},150));
}
function weekly_move(me,orili,h,h2){
me.addClass("current");
$(".weekly-list li").unbind("mouseenter",weekly_ani);
setTimeout(function(){
var cur_h=me.height();
if(cur_h < h-2){
var cur_orih=orili.height();
var dh=Math.round((h-cur_h)/2.5);
me.css("height",cur_h+dh);
orili.css("height",cur_orih-dh);
setTimeout(arguments.callee,25);
}
else{
me.addClass("current").css("height",h);
orili.css("height",h2);
$(".weekly-list li").bind("mouseenter",weekly_ani);
orili.removeClass("current");
}
},25);
}
$(".weekly-list").find("li:first").addClass("current").animate({height:100}, 300);
});
</script>
<br>
<div style="text-align:center;clear:both">
</div>
</html>



用戶評論
大牛,別默默的看了,快登錄幫我點評一下吧!:)      登錄 | 注冊


熱門標簽: 圖片全屏 圖片淡出淡進 圖片淡出 圖片淡進 二維碼 圖片延遲加載 圖片延遲 圖片加載 圖片翻轉 圖片旋轉 圖片疊加 圖片層疊 圖片拖動 圖片拖拽 圖片放大鏡 頭像上傳 圖片上傳 帶縮略圖的幻燈片 h5圖片動畫 h5圖標動畫 html5圖片動畫 html5圖標動畫 圖片放大縮小 圖片縮放 圖片大小 圖片放大 圖片縮小 圖片變大 圖片變小 圖片廣告 地圖 中國地圖 世界地圖 滾動切換 滾動條切換 滑動選項卡 滑動切換 旋轉木馬 圖片旋轉木馬 文字旋轉木馬 旋轉木馬插件 圖片滾動 圖片滾動條 圖片滑動 圖片滑塊 圖片收縮展開 圖片收縮 圖片展開 純圖片輪播 圖片輪播 圖片切換 圖片選項卡 圖標選項卡 自動滾動圖片輪播 圖標導航 圖標菜單 選項卡切換 選項卡 切換 tab切換 頁面切換 選項卡插件 切換插件 背景切換 大圖切換 滑動手風琴 手風琴 水平手風琴 垂直手風琴 圖片手風琴 文字手風琴 手風琴插件 滑動星星打分 收縮展開 展開收縮 收縮 展開 圖表 圖片 圖片插件 頭像截圖 其他 收縮菜單 收縮導航 圖片切換 圖片選項卡 圖標選項卡 手風琴 水平手風琴 垂直手風琴 圖片手風琴 文字手風琴 手風琴插件 圖片文字 鼠標滑過 鼠標懸停 跟隨鼠標移動
×
×

注冊

官方QQ群

掃描上面二維碼加微信群

官方QQ群

jQuery/js討論群
群號:642649996
Css3+Html5討論群
群號:322131262

加群請備注:從官網了解到

老夫子电子