"text"
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/indyplanets/pen/EamaYg?depth=everything&limit=all&order=popularity&page=20&q=text&show_forks=false" /> <style class="cp-pen-styles">body { background: #2d2d2d; font-family: Chaparral Pro; } h1.intro { margin-top: 100px; margin-bottom: 0; font-weight: 200; font-size: 26px; font-size: 1.625rem; line-height: 1.3; font-style: italic; color: white; text-align: center; } @media all and (min-width: 64em) { h1.intro { font-size: 30px; font-size: 1.875rem; } } h1.intro em { font-style: normal; font-weight: 700; display: block; font-size: 28px; font-size: 1.75rem; margin-bottom: 15px; color: white; } @media all and (min-width: 64em) { h1.intro em { font-size: 40px; font-size: 2.5rem; } } h1.intro em .change-text { width: 130px; height: 28px; display: inline-block; position: relative; border-bottom: 1px solid rgba(255, 255, 255, 0.6); margin-bottom: -8px; } @media all and (min-width: 41.625em) { h1.intro em .change-text { height: 26px; width: 127px; margin-bottom: -6px; } } @media all and (min-width: 50em) { h1.intro em .change-text { height: 28px; width: 127px; margin-bottom: -6px; } } @media all and (min-width: 64em) { h1.intro em .change-text { width: 190px; height: 34px; margin-bottom: -6px; } } h1.intro em .change-text:before { content: ''; background: white; position: absolute; right: -20px; bottom: -1px; height: 41px; width: 20px; display: none; } h1.intro em .change-text span { -webkit-transition: all 0.4s ease-in-out; -moz-transition: all 0.4s ease-in-out; transition: all 0.4s ease-in-out; text-align: left; position: absolute; top: 0; left: 0; opacity: 0; line-height: 1; clip: rect(0px, 0px, 198px, 0px); } h1.intro em .change-text span:after { content: ''; background: white; position: absolute; right: -40px; bottom: -1px; height: 41px; width: 10px; display: none; } h1.intro em .change-text span.active { -webkit-transition: all 0.85s ease-in-out; -moz-transition: all 0.85s ease-in-out; transition: all 0.85s ease-in-out; opacity: 1; clip: rect(0, 198px, 198px, 0px); } </style></head><body> <h1 class="intro">Getting the most out of <em>Talented <div class="change-text"><span class="active">Animators</span><span>Designers</span><span>Directors</span><span>Coders</span></div></em></h1> <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 >// text rotator textRotator = function(element) { var words = $(element), total = words.length - 1, position = 0, current = null, timer = null; $(element).first().addClass('active'); var autoSlide = function() { words.removeClass('active'); if (position === total) { position = 0; } else { position = position + 1; } //console.log(position); words.eq(position).addClass('active'); }; timer = setInterval(autoSlide, 3000); }; $(document).ready(function() { textRotator('.change-text span'); }); //# sourceURL=pen.js </script> </body></html>

Related: See More


Questions / Comments: