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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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 id="boxWrapper">
  <div>T</div>
  <div>H</div>
  <div>I</div>
  <div>S</div><br />
  <div>R</div>
  <div>U</div>
  <div>L</div>
  <div>E</div>
  <div>S</div>
</div>
              
            
!

CSS

              
                #boxWrapper {
    width:700px;
    height:300px;
    visibility:hidden;
}

#boxWrapper div {
    width:80px;
    height:80px;
    background-color:purple;
    margin:10px;
    display:inline-block;
    font-size:60px;
    line-height:80px;
    color:white;
    text-align:center;
    -webkit-font-smoothing:antialiased;
    /* we apply a 3d transform just to improve rendering */
    -webkit-transform:translateZ(0.1px);
    -moz-transform:translateZ(0.1px);
    -o-transform:translateZ(0.1px);
    -ms-transform:translateZ(0.1px);
    transform:translateZ(0.1px);
}

              
            
!

JS

              
                //we hide the wrapper initially and then show it once the page loads and we're ready to animate (to prevent the user from seeing a flash of content on the screen). We use jQuery for simplicity, but it'd be just as easy to alter the element's style.visibility directly or use a TweenLite.set() call. In fact, we don't need jQuery at all for this page - we just wanted to demonstrate how well GSAP and jQuery can work together.
$("#boxWrapper").css({visibility:"visible"});

var tl = new TimelineLite(),
    letters = $("#boxWrapper div");
tl.staggerFrom(letters, 0.5, {opacity:0, scale:0, rotation:-180}, 0.3)
  .staggerTo(letters, 0.3, {scale:0.8}, 0.3, 0.7);
              
            
!
999px

Console