今天我想和大家分享一个有趣的圆形幻灯片。我们可以通过点击左、右、左上、左下、右上、右下6个方向来切换幻灯片,而幻灯片也会朝着指定的方向旋转切换。
1、引入以下的js和css文件
1 2 3 4 5 | <link rel="stylesheet" type="text/css" href="css/default.css"><link rel="stylesheet" type="text/css" href="css/component.css"><script src="js/modernizr.custom.js"></script><script src="js/jquery.flipshow.js"></script> |
2、在head标签中加入以下js代码
1 2 3 4 5 | <script>$( function() { $( '#fc-slideshow' ).flipshow();} );</script> |
3、在body标签中加入以下格式的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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | <div id="fc-slideshow" class="fc-slideshow"> <ul class="fc-slides"> <li> <img src="images/1.jpg"> <h3> Hot </h3> </li> <li> <img src="images/2.jpg"> <h3> Cold </h3> </li> <li> <img src="images/3.jpg"> <h3> Light </h3> </li> <li> <img src="images/4.jpg"> <h3> Dark </h3> </li> <li> <img src="images/5.jpg"> <h3> Soft </h3> </li> <li> <img src="images/6.jpg"> <h3> Hard </h3> </li> <li> <img src="images/7.jpg"> <h3> Smooth </h3> </li> <li> <img src="images/8.jpg"> <h3> Rough </h3> </li> </ul></div> |
1 2 3 4 5 6 | $.Flipshow.defaults = { // 默认切换速度 (ms) speed : 700, // 默认过渡效果 easing : 'cubic-bezier(.29,1.44,.86,1.06)'}; |
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com