Pen Settings

HTML

CSS

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

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                 <div class="home-intro">
<h1>Hello, World</h1>
<a class="home-info flipper" href="#">
  <h1 >I'm a designer. </h1>
  <h4>Read More</h4>
</a>
<a class="home-work flipper" href="#">
  <h1>I'm a developer. </h1>
  <h4>Read More</h4>
</a>

</dv>
              
            
!

CSS

              
                body{
  height: 600px;
  padding: 50px;
  color: #fff;
background: #133360; /* Old browsers */
background: -moz-linear-gradient(45deg,  #133360 0%, #7abcb0 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,#133360), color-stop(100%,#7abcb0)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(45deg,  #133360 0%,#7abcb0 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(45deg,  #133360 0%,#7abcb0 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(45deg,  #133360 0%,#7abcb0 100%); /* IE10+ */
background: linear-gradient(45deg,  #133360 0%,#7abcb0 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#133360', endColorstr='#7abcb0',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}

.home-intro>a{
  display: block;
  position: relative;
  color:#fff;
  text-decoration: none;
  margin-top: 30px;
}
h1, h4{
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 200;
  letter-spacing: .1em;
  font-size:32px;
  margin:0;
}
.home-intro a h1{
  position: relative;
}
a.flipper h1{
  display: inline-block;
}
a.flipper h1 span{
  opacity:1;
  transition: all .5s ease-in-out;
}
a.flipper:hover h1 span{
  opacity:0;
}
a.flipper h4{
  position: absolute;
  display: inline-block;
  padding-left:10px;
  opacity: 0;
  transition: all .3s ease-in-out 0s;
  vertical-align: middle;
}
a.flipper:hover h4{
  opacity: 1;
  transition-delay: .6s;
}
a.flipper h1:after{
  content: '';
  display:block;
  position: absolute;
  top:16px;
  border-top: 1px solid #fff;
  width: 0px;
  transition: all .8s ease-in-out;
}
a.flipper:hover h1:after{
  width:100%;
}
              
            
!

JS

              
                (function($) {
 // Define the animation function name as "flip" //
	$.fn.flip = function() {
  	// Chainability
  	return this.each( function() { 
  
        var obj = $( this );
        var chars = obj.text().length;
        var flipper = {
              arr : obj.text().split( '' ), //Split all the text element from the selector // 

              main : function() {
                obj.text( '' );
                $.each( this.arr, function( index, value ) {
                  if ( value === ' ' )
                    value = '&nbsp';
            				obj.append( '<span class="flipping ld' + index + '" style="-webkit-transition-delay:' + (index/30) + 's;">' + value + '</span>' );
        				});  
    					}
          
  				};//--Finish Define of flipper
  flipper.main(); 
   
  });

};

}(jQuery));


// USAGE
$( '.flipper h1' ).flip();

              
            
!
999px

Console