Flickerplate是一个jquery图片轮播插件。使用时需要使用Modernizr来做触摸检测,所以必须引入jQuery和Modernizr。
引入必要的js文件和css文件
1 2 3 4 5 6 7 8 9 10 | < head > // Required javascript < script src = "js/min/jquery-v1.10.2.min.js" ></ script > < script src = "js/min/modernizr-custom-v2.7.1.min.js" ></ script > < script src = "js/min/jquery-finger-v0.1.0.min.js" ></ script > // Flickerplate < script src = "js/min/flickerplate.min.js" ></ script > < link href = "css/flickerplate.css" rel = "stylesheet" type = "text/css" > </ head > |
HTML结构
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | < div class = "flicker-example" > < ul > < li data-background = "img/flicker-1.jpg" > < div class = "flick-title" > Flickerplate Is Working </ div > < div class = "flick-sub-text" > Heaven forbid this package you downloaded is broken. That wouldn't be embarrassing at all. </ div > </ li > < li data-background = "img/flicker-2.jpg" > < div class = "flick-title" > Editable via Javascript or CSS </ div > < div class = "flick-sub-text" > Take a look at the extensive documentation to see how you can change the settings in multiple ways. </ div > </ li > < li data-background = "img/flicker-3.jpg" > < div class = "flick-title" > Touch Enabled Through the Hammer.js Library </ div > < div class = "flick-sub-text" > Hammer.js is a great touch library that has been included as part of the Flickerplate package. </ div > </ li > </ ul > </ div > |
js
1 2 3 4 5 6 7 8 9 10 | <script> $( function (){ $( '.flicker-example' ).flickerplate( { auto_flick : true , auto_flick_delay : 8, flick_animation : 'transform-slide' }); }); </script> |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com