This time I will share jQuery Plugin and tutorial about Easy Fullscreen Carousel Slider Plugin For jQuery – slider.js, hope it will help you in programming stack.
slider.js is a lightweight, simple-to-use jQuery plugin that helps you generate a fullscreen, responsive slider carousel for showcasing your photos, designs and stories.
How to use it:
1. Place jQuery library and the jQuery slider.js script at the bottom of the document so the pages load faster.
1 |
< script src = "//code.jquery.com/jquery-1.11.3.min.js" ></ script > |
2 |
< script src = "assets/js/slider.js" ></ script > |
2. The primary html structure for the slider carousel.
01 |
< div id = "main-slider" > |
02 |
< div class = "slide slide-1" > |
03 |
< div class = "container" > |
04 |
< div class = "vertical-hook" ></ div > |
05 |
< div class = "vertical-container" > |
08 |
< p >This is slide one</ p > |
13 |
< div class = "slide slide-2" > |
14 |
< div class = "container" > |
15 |
< div class = "vertical-hook" ></ div > |
16 |
< div class = "vertical-container" > |
19 |
< p >This is slide two</ p > |
24 |
< div class = "slide slide-3" > |
25 |
< div class = "container" > |
26 |
< div class = "vertical-hook" ></ div > |
27 |
< div class = "vertical-container" > |
30 |
< p >This is slide three</ p > |
3. The core CSS styles for the slider carousel.
004 |
-webkit-backface- visibility : hidden ; |
006 |
backface- visibility : hidden ; |
007 |
transform: translate 3 d( 0 , 0px , 0px ); |
008 |
-webkit-transition: all 0.5 s; |
009 |
-moz-transition: all 0.5 s; |
010 |
-ms-transition: all 0.5 s; |
011 |
-o-transition: all 0.5 s; |
012 |
transition: all 0.5 s; |
015 |
.slider-wrapper-outer { |
022 |
.slider-item { float : left ; } |
032 |
display : inline- block ; |
033 |
border : 1px solid transparent ; |
034 |
background-position : 50% 50% ; |
035 |
background- size : 70px auto ; |
036 |
background-color : rgba( 170 , 170 , 170 , 0.5 ); |
037 |
-webkit-transition: all 0.4 s; |
038 |
-moz-transition: all 0.4 s; |
039 |
-ms-transition: all 0.4 s; |
040 |
-o-transition: all 0.4 s; |
041 |
transition: all 0.4 s; |
046 |
background-image : url ( "../arrows/arrow-left.svg" ); |
050 |
source : jqueryscript.net
|