This time I will share jQuery Plugin and tutorial about Draggable Background Slideshow With jQuery And GSAP – Wavescroll, hope it will help you in programming stack.
Wavescroll is a fancy, touchable slideshow which allows the use to scroll through a set of background images with a cool ‘Wavescroll’ animation effects. Supports drag, touch swipe and mouse scroll events. Built with jQuery, CSS3, requestAnimationFrame and GSAP’s TweenMax.js.
How t use it:
1. Build the html structure for the background slideshow.
01 |
< div class = "ws-pages" > |
03 |
< div class = "ws-bg" ></ div > |
04 |
< div class = "ws-bg" ></ div > |
05 |
< div class = "ws-bg" ></ div > |
06 |
< div class = "ws-bg" ></ div > |
07 |
< div class = "ws-bg" ></ div > |
10 |
< h2 class = "ws-text__heading" > |
11 |
< span >This is Slide 1</ span > |
13 |
< h2 class = "ws-text__heading" > |
14 |
< span >This is Slide 2</ span > |
16 |
< h2 class = "ws-text__heading" > |
17 |
< span >This is Slide 3</ span > |
19 |
< h2 class = "ws-text__heading" > |
20 |
< span >This is Slide 4</ span > |
22 |
< h2 class = "ws-text__heading" > |
23 |
< span >This is Slide 5</ span > |
2. The primary CSS styles.
14 |
background- size : cover; |
15 |
background-position : center center ; |
18 |
.ws-pages.s--ready .ws-bg { background : none !important ; } |
32 |
background- size : cover; |
33 |
background-position : center center ; |
36 |
-webkit-user-select: none ; |
37 |
-moz-user-select: none ; |
38 |
-ms-user-select: none ; |
51 |
.ws-bg__part -1: after { left : 0 vw; } |
53 |
.ws-bg__part -2: after { left : -4.16667 vw; } |
55 |
.ws-bg__part -3: after { left : -8.33333 vw; } |
57 |
.ws-bg__part -4: after { left : -12.5 vw; } |
59 |
.ws-bg__part -5: after { left : -16.66667 vw; } |
61 |
.ws-bg__part -6: after { left : -20.83333 vw; } |
63 |
.ws-bg__part -7: after { left : -25 vw; } |
65 |
.ws-bg__part -8: after { left : -29.16667 vw; } |
67 |
.ws-bg__part -9: after { left : -33.33333 vw; } |
69 |
.ws-bg__part -10: after { left : -37.5 vw; } |
71 |
.ws-bg__part -11: after { left : -41.66667
source : jqueryscript.net
|