"animation"
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 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/hakimel/pen/Eikbv?limit=all&page=34&q=animation" /> <style class="cp-pen-styles">html, body { margin: 10px; text-align: center; font-family: Helvetica, sans-serif; } p { display: inline-block; color: #333; vertical-align: middle; font-size: 20px; text-align: right; line-height: 1.6; } p a { color: #333; padding: 2px 4px; border: 1px solid #aaa; border-radius: 2px; text-decoration: none; } p a:hover { border-color: #000; color: #000; } .animation { display: inline-block; position: relative; width: 378px; height: 290px; margin: 0 auto; vertical-align: middle; } .animation .device { position: absolute; width: 100%; height: 100%; left: 50%; top: 50%; background: #111; -webkit-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); -moz-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); -ms-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); -moz-transform: translate(-50%, -50%); -ms-transform: translate(-50%, -50%); -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); } .animation .device .phone-home-button, .animation .device .tablet-home-button { position: absolute; border-radius: 50%; background: #444; opacity: 0; z-index: 1; -webkit-transition: all 0.4s ease; -moz-transition: all 0.4s ease; -ms-transition: all 0.4s ease; transition: all 0.4s ease; } .animation .device .phone-home-button { width: 16px; height: 16px; margin-top: -8px; right: 11px; top: 50%; } .animation .device .tablet-home-button { width: 12px; height: 12px; margin-left: -6px; bottom: 7px; left: 50%; } .animation .device .screen-stand { position: absolute; width: 100%; margin-left: -10px; margin-top: -1px; top: 60%; opacity: 0; z-index: 1; -webkit-transition: all 0.4s ease-out; -moz-transition: all 0.4s ease-out; -ms-transition: all 0.4s ease-out; transition: all 0.4s ease-out; } .animation .device .screen-stand .leg { position: absolute; width: 12px; height: 16px; left: 50%; top: 0; margin-left: -6px; background: #111; } .animation .device .screen-stand .foot { position: absolute; width: 120px; height: 4px; left: 50%; top: 15px; margin-left: -60px; border-top-left-radius: 2px; border-top-right-radius: 2px; background: #111; } .animation .device .display { position: relative; width: 100%; height: 100%; overflow: hidden; background: #34495e; z-index: 3; } .animation .device .display div { position: absolute; width: 100%; height: 100%; left: 100%; white-space: nowrap; -webkit-transition: all 0.4s ease; -moz-transition: all 0.4s ease; -ms-transition: all 0.4s ease; transition: all 0.4s ease; } .animation .device .display div div { position: absolute; width: 100%; left: 0; top: 50%; margin-top: -14px; font-size: 1.1em; text-align: center; color: #fff; } .animation .device .display div div em { font-weight: bold; } .animation .device .display .slide1 { background: #34495e; } .animation .device .display .slide2 { background: #16a085; } .animation .device .display .slide3 { background: #3498db; } .animation[data-animation-step="1"] .device { width: 70%; height: 70%; padding: 10px; border-radius: 4px; } .animation[data-animation-step="1"] .device .slide1 { left: 0%; } .animation[data-animation-step="1"] .device .screen-stand { opacity: 1; top: 100%; } .animation[data-animation-step="2"] .device { width: 45%; height: 82%; padding: 24px; border-radius: 10px; } .animation[data-animation-step="2"] .device .slide1 { left: -100%; } .animation[data-animation-step="2"] .device .slide2 { left: 0%; } .animation[data-animation-step="2"] .device .tablet-home-button { opacity: 1; } .animation[data-animation-step="3"] .device { width: 60%; height: 42%; padding: 10px 36px; border-radius: 6px; } .animation[data-animation-step="3"] .device .slide1, .animation[data-animation-step="3"] .device .slide2 { left: -100%; } .animation[data-animation-step="3"] .device .slide3 { left: 0%; } .animation[data-animation-step="3"] .device .phone-home-button { opacity: 1; } </style></head><body> <p>A device loop animation<br>from <a href="http://slid.es" target="_blank">slid.es</a></p> <div class="animation" data-animation-step="1"> <div class="device"> <div class="phone-home-button"></div> <div class="tablet-home-button"></div> <div class="screen-stand"><div class="leg"></div><div class="foot"></div></div> <div class="display"> <div class="slide1"><div>Works on <em>desktops</em></div></div> <div class="slide2"><div>Works on <em>tablets</em></div></div> <div class="slide3"><div>Works on <em>phones</em></div></div> </div> </div> </div> <script src='//production-assets.codepen.io/assets/common/stopExecutionOnTimeout-b2a7b3fe212eaa732349046d8416e00a9dec26eb7fd347590fbced3ab38af52e.js'></script> <script >// this thing is js driven on slid.es so I didn't bother switching out for css animations var duration = 7000, steps = 3, step = 1; setInterval( function() { document.querySelector( '.animation' ).setAttribute( 'data-animation-step', step = ++step > steps ? 1 : step ); }, duration / steps ); //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: