"product slide"
Bootstrap 3.0.0 Snippet by evarevirus

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html><html lang='en' class=''> <head><script src='//production-assets.codepen.io/assets/editor/live/console_runner-079c09a0e3b9ff743e39ee2d5637b9216b3545af0de366d4b9aad9dc87e26bfd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/events_runner-73716630c22bbc8cff4bd0f07b135f00a0bdc5d14629260c3ec49e5606f98fdd.js'></script><script src='//production-assets.codepen.io/assets/editor/live/css_live_reload_init-2c0dc5167d60a5af3ee189d570b1835129687ea2a61bee3513dee3a50c115a77.js'></script><meta charset='UTF-8'><meta name="robots" content="noindex"><link rel="shortcut icon" type="image/x-icon" href="//production-assets.codepen.io/assets/favicon/favicon-8ea04875e70c4b0bb41da869e81236e54394d63638a1ef12fa558a4a835f1164.ico" /><link rel="mask-icon" type="" href="//production-assets.codepen.io/assets/favicon/logo-pin-f2d2b6d2c61838f7e76325261b7195c27224080bc099486ddd6dccb469b8e8e6.svg" color="#111" /><link rel="canonical" href="https://codepen.io/jcoulterdesign/pen/mJoqXd?depth=everything&order=popularity&page=7&q=product&show_forks=false" /> <style class="cp-pen-styles">body { margin: 0; padding: 0; height: 100vh; /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#ffffff+0,ffffff+50,f4f4f4+51,d8d8d8+100 */ background: white; /* Old browsers */ background: -moz-linear-gradient(top, white 0%, white 50%, #f4f4f4 51%, #d8d8d8 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(50%, white), color-stop(51%, #f4f4f4), color-stop(100%, #d8d8d8)); } .p_slider { width: 200px; height: 339px; position: absolute; left: 0; right: 0; bottom: 0; top: 0; margin: auto; } .p_slider .left, .p_slider .right { cursor: pointer; position: absolute; z-index: 10; } .p_slider__item { position: absolute; width: 200px; height: 200px; cursor: pointer; -webkit-transition-duration: 1.5s; transition-duration: 1.5s; transition-property: transform,left,opacity,-webkit-filter; } .p_slider__item img { width: 200px; -webkit-transform: scale(0); transform: scale(0); position: relative; -webkit-animation: scale_bounce 1.2s .4s forwards; animation: scale_bounce 1.2s .4s forwards; -webkit-box-reflect: below 4px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(50%, transparent), to(rgba(255, 255, 255, 0.2))); } .p_slider__item:nth-of-type(1) { -webkit-transform: scale(0.6); transform: scale(0.6); left: -200px; -webkit-filter: blur(2px); opacity: 0.8; z-index: 1; } .p_slider__item:nth-of-type(2) { -webkit-transform: scale(1); transform: scale(1); left: 0px; z-index: 2; } .p_slider__item:nth-of-type(3) { -webkit-transform: scale(0.6); transform: scale(0.6); left: 200px; z-index: 1; -webkit-filter: blur(2px); opacity: 0.8; } .controls { position: absolute; width: 100%; top: 50%; -webkit-transform: translateY(-50%); transform: translateY(-50%); } .controls .left { float: left; cursor: pointer; position: relative; left: 40px; } .controls .left img { -webkit-transform: rotate(180deg); transform: rotate(180deg); -webkit-transition: all .4s; transition: all .4s; opacity: 0.2; } .controls .left img:hover { opacity: 1; cursor: pointer; } .controls .right { float: right; cursor: pointer; position: relative; right: 40px; } .controls .right img { -webkit-transition: all .4s; transition: all .4s; opacity: 0.2; } .controls .right img:hover { opacity: 1; cursor: pointer; } @-webkit-keyframes scale_bounce { 0% { -webkit-transform: scale(0); transform: scale(0); } 20% { -webkit-transform: scale(1.1); transform: scale(1.1); } 40% { -webkit-transform: scale(0.98); transform: scale(0.98); } 60% { -webkit-transform: scale(1.012); transform: scale(1.012); } 80% { -webkit-transform: scale(0.995); transform: scale(0.995); } 100% { -webkit-transform: scale(1); transform: scale(1); } } @keyframes scale_bounce { 0% { -webkit-transform: scale(0); transform: scale(0); } 20% { -webkit-transform: scale(1.1); transform: scale(1.1); } 40% { -webkit-transform: scale(0.98); transform: scale(0.98); } 60% { -webkit-transform: scale(1.012); transform: scale(1.012); } 80% { -webkit-transform: scale(0.995); transform: scale(0.995); } 100% { -webkit-transform: scale(1); transform: scale(1); } } </style></head><body> <div class='p_slider'> <div class='p_slider__item'> <img src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/iwatch1.png'> </div> <div class='p_slider__item'> <img src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/iwatch2.png'> </div> <div class='p_slider__item'> <img src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/iwatch3.png'> </div> </div> <div class='controls'> <div class='left'> <img src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/arrow.png'> </div> <div class='right'> <img src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/217233/arrow.png'> </div> </div> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script><script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script >// 3D Slider for Reece /*================================================= INIT ===================================================*/ on = 0; // Init time = 500; // Set the delay before the next click is accepted to 1 second pos = 1; // Set init position pos2 = 2; pos3 = 3; /*================================================= CLICK FUNCTIONS ===================================================*/ // Right $('.right').click(function(){ rotateRight(); // Call on = 1; // Set delay on }); // Left $('.left').click(function(){ rotateLeft(); // Call on = 1; // Set delay on }); /*================================================= AUTOPLAY ===================================================*/ play = setInterval(function(){ rotateLeft() },3000) /*================================================= ROTATE FUNCTIONS ===================================================*/ // Rotate left function rotateLeft(){ if(on == 0){ $('.p_slider__item:nth-of-type(' + pos + ')').animate({'left':'200px'},200) $('.p_slider__item:nth-of-type(' + pos + ')').css('z-index','0') $('.p_slider__item:nth-of-type(' + pos2 + ')').animate({'left':'-200px'},200) setTimeout (function(){ $('.p_slider__item:nth-of-type(' + pos2 + ')').css({'transform':'scale(0.6)','opacity':'0.8','webkit-filter':'blur(2px)','z-index':'1'}); pos++;pos2++;pos3++; if(pos > 3){pos = 1}if(pos2 > 3){pos2 = 1;}if(pos3 > 3){pos3 = 1;} },400) $('.p_slider__item:nth-of-type(' + pos3 + ')').animate({'left':'0px'},200) $('.p_slider__item:nth-of-type(' + pos3 + ')').css({'transform':'scale(1)','opacity':'1','webkit-filter':'blur(0px)','z-index':'2'}) setTimeout (function(){ on = 0; // Accept clicks again },time) } } // Rotate right function rotateRight(){ if(on == 0){ $('.p_slider__item:nth-of-type(' + pos3 + ')').animate({'left':'-200px'},200) $('.p_slider__item:nth-of-type(' + pos3 + ')').css('z-index','0') $('.p_slider__item:nth-of-type(' + pos2 + ')').animate({'left':'200px'},200) setTimeout (function(){ $('.p_slider__item:nth-of-type(' + pos2 + ')').css({'transform':'scale(0.6)','opacity':'0.8','webkit-filter':'blur(2px)','z-index':'0'}); pos--;pos2--;pos3--; if(pos < 1){pos = 3}if(pos2 < 1){pos2 = 3;}if(pos3 < 1){pos3 = 3;} console.log(pos,pos2,pos3) },400) $('.p_slider__item:nth-of-type(' + pos + ')').animate({'left':'0px'},200) $('.p_slider__item:nth-of-type(' + pos + ')').css({'transform':'scale(1)','opacity':'1','webkit-filter':'blur(0px)','z-index':'1'}) setTimeout (function(){ on = 0; // Accept clicks again },time) } } $('.p_slider__item img').hover(function(){ clearInterval(play) }) $('.p_slider__item img').mouseenter(function(){ $(this).animate({'top':'-14px'},300); }) $('.p_slider__item img').mouseout(function(){ $(this).stop(true,false).animate({'top':'0px'},300) play = setInterval(function(){ rotateLeft() },3000) }) //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: