cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <div id="centerMe">
  <div class="floatLeft">
    <div class="title">Magic</div>
    <div id="spinner" class="title rotate">+</div>
  </div>
  <div id="textWrapper">
    <div class="title live">Awesome Word</div>
    <div class="title bottom hidden"></div>
  </div>

</div>
            
          
!
            
              body {
  background:#2A2C31;
}

#centerMe {
  margin:10% 30%;
  height:40px;
  width:525px;
}

.title{ 
  color:white;  
  font-family:Tahoma;
  float:left;
  font-size:40px;
  line-height:40px;
  padding:0 10px;
  text-shadow:none;
  font-weight:100;
  -webkit-font-smoothing: antialiased;
  -moz-font-smoothing: antialiased;
  -o-font-smoothing: antialiased;
  -ms-font-smoothing: antialiased;
  font-smoothing: antialiased
}

.hidden{
  display: none;
}

.floatLeft {
  float:left; 
}

#textWrapper {
  height:40px;
  width:350px;
  float:right;
}

.bottom {
  margin: 75px 0 0 0; 
  opacity:0;
}

.live {
  margin:0;
}

.rotate {
  -webkit-transition:all 0.9s;
  -moz-transition:all 0.9s;
  -ms-transition:all 0.9s;
  -o-transition:all 0.9s;
  transition:all 0.9s;
  -webkit-transition-timing-function:ease-out;
  -moz-transition-timing-function:ease-out;
  -ms-transition-timing-function:ease-out;
  -o-transition-timing-function:ease-out;
  transition-timing-function:ease-out;
  -webkit-transform:rotate(-360deg);
  -moz-transform:rotate(-360deg);
  -ms-transform:rotate(-360deg);
  -o-transform:rotate(-360deg);
  transform:rotate(-360deg);
}
  </style>

  <style>
    #codepen-footer, #codepen-footer * {
      -webkit-box-sizing: border-box !important;
      -moz-box-sizing: border-box !important;
      box-sizing: border-box !important;
    }
    #codepen-footer {
      display: block !important;
      position: fixed !important;
      top: auto !important;
      bottom: 0 !important;
      left: 0 !important;
      right: auto !important;
      width: 100% !important;
      padding: 0 10px !important;
      margin: 0 !important;
      height: 30px !important;
      line-height: 30px !important;
      font-size: 12px !important;
      color: #eeeeee !important;
      background-color: #505050 !important;
      text-align: left !important;
      background: -webkit-linear-gradient(top, #505050, #383838) !important;
      background: -moz-linear-gradient(top, #505050, #383838) !important;
      background: -ms-linear-gradient(top, #505050, #383838) !important;
      background: -o-linear-gradient(top, #505050, #383838) !important;
      border-top: 1px solid black !important;
      border-bottom: 1px solid black !important;
      border-radius: 0 !important;
      border-image: none !important;
      box-shadow: inset 0 1px 0 #6e6e6e, 0 2px 2px rgba(0, 0, 0, 0.4) !important;
      z-index: 300 !important;
      font-family: "Lucida Grande", "Lucida Sans Unicode", Tahoma, sans-serif !important;
      letter-spacing: 0 !important;
      word-spacing: normal !important;
      word-spacing: 0 !important;
      -webkit-transform: none !important;
      -moz-transform: none !important;
      -ms-transform: none !important;
      -o-transform: none !important;
      transform: none !important;
    }
    #codepen-footer a {
      color: #a7a7a7 !important;
      text-decoration: none !important;
      text-shadow: none !important;
      border: 0 !important;
    }
    #codepen-footer a:hover {
      color: white !important;
    }
    #codepen-footer:before,
    #codepen-footer:after {
      display: none;
    }
            
          
!
            
              
var words = ['Awesome Cool', 'awesome ooohs', 'Awesome Word'];
var numOfWords = words.length;
var counter = 0;

setInterval(function() {
  //make the fing thing rotate
	$('#spinner').toggleClass('rotate');
	//
}, 1750); 

setInterval(function() {

	var coreAnim = function(){ 
		var live = $('.live');
		var bottom = $('.bottom');
	
	   //live moves to top and hide
	   live.animate({ 
			opacity: 0.0,
			marginTop: "-100px"
		}, 1000, 'linear', function(){
			live.removeClass('live').addClass('bottom hidden');
			live.removeAttr('style');
		});
	   //bottom unhide moves to live 
	   bottom.text(words[counter]);
	   bottom.removeClass("hidden");
	   bottom.animate({ 
			opacity: 1.0,
			marginTop: "0px"
		}, 1000, 'linear', function(){
			bottom.removeClass('bottom').addClass('live');
			bottom.removeAttr('style');
		});
	};

	var updateCounter = function(){
		if((counter + 1) == numOfWords){
			counter = 0;
		} else {
			counter++;
		}
	};

	var cleanUp = function(){
		var item = $('.bottom');		
		$after = item.next();
		item.insertAfter($after);
	};
	
	coreAnim();
	updateCounter();
	cleanUp();

}, 3500);

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console