基於jquery圖片標題隨小圓點放大切換。這是是一款帶時間軸的圖片輪播切換代碼。效果圖以下:javascript
實現的代碼。java
html代碼:jquery
<div id="decoroll2" class="imgfocus"> <div id="decoimg_a2" class="imgbox"> <div class="decoimg_b2"> <a href="http://www.w2bc.com/"> <img src="img/1.jpg"></a></div> <div class="decoimg_b2"> <a href="http://www.w2bc.com/"> <img src="img/2.jpg"></a></div> <div class="decoimg_b2"> <a href="http://www.w2bc.com/"> <img src="img/3.jpg"></a></div> <div class="decoimg_b2"> <a href="http://www.w2bc.com/"> <img src="img/4.jpg"></a></div> </div> <ul id="deconum2" class="num_a2"> <li><a href="javascript:void(0)" hidefocus="true" target="_self">楊冪</a></li> <li><a href="javascript:void(0)" hidefocus="true" target="_self">范冰冰</a></li> <li><a href="javascript:void(0)" hidefocus="true" target="_self">高圓圓</a></li> <li><a href="javascript:void(0)" hidefocus="true" target="_self">劉詩詩</a></li> </ul> </div>
js代碼:ide
Qfast.add('widgets', { path: "js/terminator2.2.min.js", type: "js", requires: ['fx'] }); Qfast(false, 'widgets', function () { K.tabs({ id: 'decoroll2', //焦點圖包裹id conId: "decoimg_a2", //大圖域包裹id tabId: "deconum2", //小圓點數字提示id tabTn: "a", conCn: '.decoimg_b2', //大圖域配置class auto: 1, //自動播放 1或0 effect: 'fade', //效果配置 eType: 'mouseover', // 鼠標事件 pageBt: true, //是否有按鈕切換頁碼 bns: ['.prev', '.next'], //先後按鈕配置class interval: 3000// 停頓時間 }) })