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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

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 class="page">

  <div id="home-news">
    <div class="home_header">
      <strong>Spend</strong>
      <span>your time with us</span>
    </div>
    <div class="home_header">
      <strong>Music</strong>
      <span>you love only a click away </span>
    </div>
    <div class="home_header">
      <span>explore. listen.</span>
      <strong>share</strong>
    </div>
  </div>
</div>
            
          
!
            
              body{
   font: 400 12px/1 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: -webkit-linear-gradient(90deg, #4CB8C4 10%, #3CD3AD 90%); /* Chrome 10+, Saf5.1+ */
  background:    -moz-linear-gradient(90deg, #4CB8C4 10%, #3CD3AD 90%); /* FF3.6+ */
  background:     -ms-linear-gradient(90deg, #4CB8C4 10%, #3CD3AD 90%); /* IE10 */
  background:      -o-linear-gradient(90deg, #4CB8C4 10%, #3CD3AD 90%); /* Opera 11.10+ */
  background:         linear-gradient(90deg, #4CB8C4 10%, #3CD3AD 90%); /* W3C */   
}
.page{
  margin:0 auto;
  padding-top:20em;
  width: 800px;
}
#home-news{
  font-size: 40px;
	text-align:center;
	text-transform:uppercase;
	color:#464646;
	height: 45px;
	line-height: 45px;
	overflow:hidden;
	position:relative;
}.home_header {
	position:absolute;
	width:100%;
	z-index:99;
	color:#000;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}
.home_header_on {
	z-index:100;
}.home_header strong {
	color: white;
}.home_header span, .home_header strong {
	position:relative;
	top:-50px;
}.home_header_on *:nth-child(1) {
	 top: 0;
	-webkit-transition: top .6s ease-in-out;
	-moz-transition: top .6s ease-in-out;
	 transition: top .6s ease-in-out;
}.home_header_on *:nth-child(2) {
	top: 0;
	-webkit-transition: top .6s ease-in-out .15s;
	-moz-transition: top .6s ease-in-out .15s;
	transition: top .6s ease-in-out .15s;
}.home_header_on *:nth-child(3) {
	top: 0;
	-webkit-transition: top .6s ease-in-out .3s;
	-moz-transition: top .6s ease-in-out .3s;
	transition: top .6s ease-in-out .3s;
}.home_header_out *:nth-child(1) {
	top: 50px;
	-webkit-transition: top .6s ease-in-out;
	-webkit-transition: top .6s ease-in-out;
	-moz-transition: top .6s ease-in-out;
}.home_header_out *:nth-child(2) {
	top: 50px;
	-webkit-transition: top .6s ease-in-out .15s;
	-moz-transition: top .6s ease-in-out .15s;
	transition: top .6s ease-in-out .15s;
}.home_header_out *:nth-child(3) {
	top: 50px;
	-webkit-transition: top .6s ease-in-out .3s;
	-moz-transition: top .6s ease-in-out .3s;
	transition: top .6s ease-in-out .3s;
}
            
          
!
            
              function switchClass(i) {
   var lis = $('#home-news > div');
   lis.eq(i).removeClass('home_header_on');
   lis.eq(i).removeClass('home_header_out');
    lis.eq(i = ++i % lis.length).addClass('home_header_on');
    lis.eq(i = ++i % lis.length).addClass('home_header_out');
    setTimeout(function() {
        switchClass(i);
    }, 3500);
}

$(window).load(function() {
   switchClass(-1);
});
            
          
!
999px
Loading ..................

Console