This time I will share jQuery Plugin and tutorial about 3D Transforms Based jQuery Image Carousel / Rotator, hope it will help you in programming stack.
jQuery CSS Carousel uses CSS3 3D transforms to render a 3D perspective hexagon image carousel / rotator with next / prev navigation buttons on your webpage.
How to use it:
1. Add images and navigation buttons into the carousel following the markup structure as follows:
02 |
< div id = "container" tcc-rotation = "0" > |
03 |
< item tc-rotation = "120" style = "transform: rotateY(120deg) translateZ(200px)" >< img src = "1.jpg" ></ item > |
04 |
< item tc-rotation = "240" style = "transform: rotateY(240deg) translateZ(200px)" >< img src = "2.jpg" ></ item > |
05 |
< item tc-rotation = "180" style = "transform: rotateY(180deg) translateZ(200px)" >< img src = "3.jpg" ></ item > |
06 |
< item tc-rotation = "0" style = "transform: rotateY(0deg) translateZ(200px)" >< img src = "4.jpg" ></ item > |
07 |
< item tc-rotation = "-60" style = "transform: rotateY(-60deg) translateZ(200px)" >< img src = "5.jpg" ></ item > |
08 |
< item tc-rotation = "60" style = "transform: rotateY(60deg) translateZ(200px)" >< img src = "6.jpg" ></ item > |
10 |
< nav class = "tc-btn-container" > |
11 |
< div class = "tc-next" >NEXT</ div > |
12 |
< div class = "tc-prev" >PREV</ div > |
2. The required CSS / CSS3 styles for the carousel.
05 |
-webkit-perspective: 80px ; |
16 |
transform: rotateY( 0 deg); |
17 |
-webkit-transform-origin: center bottom 0 ; |
18 |
transform-origin: center bottom 0 ; |
19 |
-webkit-transform-style: preserve -3 d; |
20 |
transform-style: preserve -3 d; |
21 |
-webkit-transition: all 1 s ease-in-out; |
22 |
transition: all 1 s ease-in-out; |
31 |
transform: translateZ( 400px ); |
35 |
item img { width : 100% ; } |
48 |
background-color : #333 ; |
59 |
background-color : #333 ; |
3. Put the necessary jQuery JavaScript library at the end of the document.
1 |
< script src = "//code.jquery.com/jquery-2.2.1.min.js" ></ script > |
4. The main JavaScript to active the 3D image carousel.
01 |
$(document).ready( function ($){ |
04 |
var ro
source : jqueryscript.net
|