在页面中引入jCircle.css和jCircle.min.js文件
1 | < link href = "jCircle.css" rel = "stylesheet" > |
HTML结构
一个圆形轮播图的基本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 | < div id = "circles-container" > < div id = "main-circle-content" ></ div > < div id = "circle" > < div data-inside = "min-circle" > < a href = "imgs/1.jpg" > < img src = "imgs/thumb_1.jpg" alt = "" > </ a > < div >Caption 1</ div > </ div > < div data-inside = "min-circle" > < a href = "imgs/2.jpg" > < img src = "imgs/thumb_2.jpg" alt = "" > </ a > < div >Caption 2</ div > </ div > < div data-inside = "min-circle" > < a href = "imgs/3.jpg" > < img src = "imgs/thumb_3.jpg" alt = "" > </ a > < div >Caption 3</ div > </ div > ... </ div > </ div > |
初始化插件
在页面DOM元素加载完毕之后,通过下面的方法来创建jCircle示例对象,并初始化该圆形轮播图插件。
1 2 3 4 5 6 7 8 9 10 11 12 13 | var circle= new jCircle({ 'container' : 'circles-container' , 'circle' : 'circle' , 'mainContent' : 'main-circle-content' , 'animateCircles' : true , 'speed' :3, 'mainViewStyle' : 'normal' , 'minCirclesEffectOver' : 'pulse' , 'contentType' : 'images' , 'stopOnOverMain' : false , 'mainContentOverAction' : 'normal' }); circle.create(); |
配置参数
该响应式圆形js轮播图插件的可用配置参数如下:
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 | var circle= new jCircle({ // Contains All Content container: 'circles-container' , // DIV That Contains Mini DIVs Circles circle: 'circle' , // Center Big Circle mainContent: 'main-circle-content' , // Class Name For Mini Circles DIVs minCirclesClass: 'min-circle' , // For Internal Use, Array Of Mini Circles DIVs minCircles: [], // [normal | enlarge-view] mainViewStyle: 'normal' , // Animates Mini Circles? animateCircles: true , // Animation Type [rotateSelf] animateType: 'rotateAround' , // Animation Status [pause | play] animateStatus: 'play' , // Animation Delay Time (speed) [Number Of Seconds] speed: 3, // Stops Animation On Mouse Over [true | false] stopOnOverMain: true , stopOnOverMini: true , // [pulse, zoomOutIn, flip, rotate] minCirclesEffectOver: 'none' , // [images | text] contentType: 'images' , // Enlarge Center Area On Mouse Over mainContentOverAction: 'normal' }); |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com