JS特效實(shí)現(xiàn)圖片自動(dòng)播放并可控的效果
更新時(shí)間:2015年07月31日 09:04:15 作者:html5前端技術(shù)分享
這篇文章主要介紹了JS代碼實(shí)現(xiàn)圖片自動(dòng)播放并可控的效果,需要的朋友可以參考下
不多說(shuō)了,實(shí)現(xiàn)方法請(qǐng)看下面代碼。
代碼如下: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <title>JS代碼實(shí)現(xiàn)圖片自動(dòng)播放并可控的效果</title><base target="_blank" /> <link rel="stylesheet" type="text/css" > <script type="text/javascript" src="http://hovertree.com/texiao/js/1/js/koala.min.1.5.js"></script> <script type="text/javascript"> Qfast.add('widgets', { path: "http://hovertree.com/texiao/js/1/js/terminator2.2.min.js", type: "js", requires: ['fx'] }); Qfast(false, 'widgets', function () { K.tabs({ id: 'decoroll2', //焦點(diǎn)圖包裹id conId: "decoimg_a2", //大圖域包裹id tabId: "deconum2", //小圓點(diǎn)數(shù)字提示id tabTn: "a", conCn: '.decoimg_b2', //大圖域配置class auto: 1, //自動(dòng)播放 1或0 effect: 'fade', //效果配置 eType: 'mouseover', // 鼠標(biāo)事件 pageBt: true, //是否有按鈕切換頁(yè)碼 bns: ['.prev', '.next'], //前后按鈕配置class interval: 3000// 停頓時(shí)間 }) }) </script> </head> <body> <div><a >首頁(yè)</a> <a >原文</a> <a >特效庫(kù)</a> </div> <div id="decoroll2" class="imgfocus"> <div id="decoimg_a2" class="imgbox"> <div class="decoimg_b2"> <a > <img src="http://hovertree.com/texiao/js/1/img/1.jpg"> </a> </div> <div class="decoimg_b2"> <a > <img src="http://hovertree.com/texiao/js/1/img/2.jpg"> </a> </div> <div class="decoimg_b2"> <a > <img src="http://hovertree.com/texiao/js/1/img/3.jpg"> </a> </div> <div class="decoimg_b2"> <a > <img src="http://hovertree.com/texiao/js/1/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">劉詩(shī)詩(shī)</a></li> </ul> </div> <br /> </body> </html>
以上代碼就是用JS實(shí)現(xiàn)圖片自動(dòng)播放并可控的效果,希望對(duì)大家有所幫助。
您可能感興趣的文章:
- js手動(dòng)播放圖片實(shí)現(xiàn)圖片輪播效果
- JS實(shí)現(xiàn)的多張圖片輪流播放幻燈片效果
- javascript控制圖片播放的實(shí)現(xiàn)代碼
- javascript+html5實(shí)現(xiàn)仿flash滾動(dòng)播放圖片的方法
- javascript實(shí)現(xiàn)圖片循環(huán)漸顯播放的方法
- js實(shí)現(xiàn)幻燈片播放圖片示例代碼
- javascript 控制圖片播放代碼
- 比較炫的圖片播放器 js 焦點(diǎn)效果代碼
- js 新浪的一個(gè)圖片播放圖片輪換效果代碼
- JS實(shí)現(xiàn)圖片自動(dòng)播放效果
相關(guān)文章
Javascript中call,apply,bind方法的詳解與總結(jié)
本文主要Javascript中call,apply,bind方法的進(jìn)行全面分析,并在文章結(jié)尾對(duì)call,apply,bind方法的聯(lián)系和區(qū)別做了總結(jié),具有很好的參考價(jià)值,需要的朋友一起來(lái)看下吧2016-12-12JavaScript Accessor實(shí)現(xiàn)說(shuō)明
關(guān)于Getter與Setter大家一定不會(huì)陌生,下面簡(jiǎn)單介紹幾種我所知道的在JavaScript中實(shí)現(xiàn)G/S的方法.2010-12-12解決layer.confirm快速點(diǎn)擊會(huì)重復(fù)觸發(fā)事件的問(wèn)題
今天小編就為大家分享一篇解決layer.confirm快速點(diǎn)擊會(huì)重復(fù)觸發(fā)事件的問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧2019-09-09關(guān)于驗(yàn)證碼在IE中不刷新的快速解決方法
下面小編就為大家?guī)?lái)一篇關(guān)于驗(yàn)證碼在IE中不刷新的快速解決方法。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2016-09-09使用requirejs模塊化開(kāi)發(fā)多頁(yè)面一個(gè)入口js的使用方式
這篇文章主要介紹了使用requirejs模塊化開(kāi)發(fā)多頁(yè)面一個(gè)入口js的使用方式,需要的朋友可以參考下2017-06-06