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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | < div class = 'o-sliderContainer hasShadow' id = "yourId" > < div class = 'o-slider' id = 'pbSlider' > < div class = "o-slider--item" data-image = "images/5.jpg" > < div class = "o-slider-textWrap" > < h1 class = "o-slider-title" >This is a title</ h1 > < span class = "a-divider" ></ span > < h2 class = "o-slider-subTitle" >This is a sub title</ h2 > < span class = "a-divider" ></ span > < p class = "o-slider-paragraph" > This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph </ p > </ div > </ div > < div class = "o-slider--item" data-image = "images/6.jpg" > < div class = "o-slider-textWrap" > < h1 class = "o-slider-title" >This is a title</ h1 > < span class = "a-divider" ></ span > < h2 class = "o-slider-subTitle" >This is a sub title</ h2 > < span class = "a-divider" ></ span > < p class = "o-slider-paragraph" > This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph </ p > </ div > </ div > < div class = "o-slider--item" data-image = "images/1.jpg" > < div class = "o-slider-textWrap" > < h1 class = "o-slider-title" >This is a title</ h1 > < span class = "a-divider" ></ span > < h2 class = "o-slider-subTitle" >This is a sub title</ h2 > < span class = "a-divider" ></ span > < p class = "o-slider-paragraph" > This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph </ p > </ div > </ div > < div class = "o-slider--item" data-image = "images/2.jpg" > < div class = "o-slider-textWrap" > < h1 class = "o-slider-title" >This is a title</ h1 > < span class = "a-divider" ></ span > < h2 class = "o-slider-subTitle" >This is a sub title</ h2 > < span class = "a-divider" ></ span > < p class = "o-slider-paragraph" > This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph </ p > </ div > </ div > < div class = "o-slider--item" data-image = "images/3.jpg" > < div class = "o-slider-textWrap" > < h1 class = "o-slider-title" >This is a title</ h1 > < span class = "a-divider" ></ span > < h2 class = "o-slider-subTitle" >This is a sub title</ h2 > < span class = "a-divider" ></ span > < p class = "o-slider-paragraph" > This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph </ p > </ div > </ div > < div class = "o-slider--item" data-image = "images/4.jpg" > < div class = "o-slider-textWrap" > < h1 class = "o-slider-title" >This is a title</ h1 > < span class = "a-divider" ></ span > < h2 class = "o-slider-subTitle" >This is a sub title</ h2 > < span class = "a-divider" ></ span > < p class = "o-slider-paragraph" > This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph This is a sub paragraph </ p > </ div > </ div > </ div > </ div > |
JAVASCRIPT
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 | <script> $( '#pbSlider0' ).pbTouchSlider({ slider_Wrap : '#yourId' , // Assign a unique ID to the div.o-sliderContainer slider_Item : '.o-slider--item' , // Single Item slider_Drag : true , // Your choise.. to dragIt or not to dragIt..this is the question... slider_Dots : { // Wanna see dots or not? class : '.o-slider-pagination' , enabled : true }, slider_Arrows : { // Wanna see Arrows or not? class : '.o-slider-arrows' , enabled : true }, slider_Threshold : 25, // Percentage of dragX before go to next/prev slider slider_Speed : 1000, slider_Breakpoints : { // Kind of media queries ( can add more if you know how to do it :D and if you need ) default : { height : 500 // height on desktop }, tablet : { height : 400, // height on tablet media : 1024 // tablet breakpoint }, smartphone : { height : 300, // height on smartphone media : 768 // smartphone breakpoint } } }); </script> |
引用库
Hammer.js /单和多点触控手势库
Lea Verou - cubic-bezier /CSS3 的缓动功能
Daniel Bruce - entypo /字体图标
jQuery / JS框架
特别申明:
本站所有资源都是由网友投稿发布,或转载各大下载站,请自行检测软件的完整性!
本站所有资源仅供学习与参考,请勿用于商业用途,否则产生的一切后果将由您自己承担!
如有侵权请联系我们删除下架,联系方式:lei1294551502@163.com