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


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


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.


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.


                <div id="demoWrapper">
  <div id="bg"></div>
    <div id="content">
      <h1>Freakishly Robust</h1>
      <h2>With features that makes other engines look like cheap toys</h2>
      <div id="info"><img src="//" width="240" height="151" id="feature">
        <p id="description">Animate colors, beziers, css properties, arrays, scrolls and lots more. Round values, smoothly reverse() on the fly, use relative values, employ virtually any easing equation, and manage conflicting tweens like a pro. GSAP does all this and much more with ease.</p>
  <div style="clear:both"></div>
  <div id="nav"> <img src="//" width="83" height="59"><img src="//" width="43" height="59"><img src="//" width="73" height="59"><img src="//" width="83" height="59"><img src="//" width="76" height="59">
  <button id="play">play()</button>
  <button id="pause">pause()</button>
  <button id="reverse">reverse()</button>
  <button id="resume">resume()</button>
  <button id="stagger">play("stagger")</button>
  <button id="restart">restart</button>
<div id="sliderWrapper">
<div id="slider"></div>



                body, h1, h2, h3, p {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  color: #fff;

body {

h1 {
  position: relative;
  margin-top: 10px;
  font-size: 36px;
  font-weight: normal;

h2 {
  position: relative;
  font-size: 22px;
  font-weight: normal;
  color: #cfcfcf;

#demoWrapper {
  width: 600px;
  height: 350px;
  -webkit-font-smoothing: antialiased;
  color: black;
#bg {
  position: absolute;
  width: 800px;
  height: 350px;
#content {
  padding-left: 15px;
  visibility: hidden;
#info {
  margin-top: 20px;
#feature {
  position: relative;
  float: left;
#description {
  position: relative;
  float: left;
  margin-left: 20px;
  width: 290px;
  font-size: 16px;
  line-height: 24px;
#nav {
  margin:20px 10px;
#nav img {
  position: relative;
  margin-right: 20px;
button {
  padding: 10px;
  margin-top: 10px;


  width: 580px;
  margin:10px auto;

.ui-widget-content {
  background-color:rgba(255, 255, 255, 0.2);


                var head = $("h1"),
	  content = $("#content"),
    subhead = $("h2"),
    feature = $("#feature"),
    description = $("#description"),
    icons = $("#nav img");
TweenLite.set(content, {visibility:"visible"})

//instantiate a TimelineLite    
var tl = new TimelineLite();

//add a from() tween at the beginning of the timline
tl.from(head, 0.5, {left:100, opacity:0});

//add another tween immediately after
tl.from(subhead, 0.5, {left:-100, opacity:0});

//use position parameter "+=0.5" to schedule next tween 0.5 seconds after previous tweens end
tl.from(feature, 0.5, {scale:.5, autoAlpha:0}, "+=0.5");

//use position parameter "-=0.5" to schedule next tween 0.25 seconds before previous tweens end.
//great for overlapping
tl.from(description, 0.5, {left:100, autoAlpha:0}, "-=0.25");

//add a label 0.5 seconds later to mark the placement of the next tween
tl.add("stagger", "+=0.5")
//to jump to this label use:"stagger");

//stagger the animation of all icons with 0.1s between each tween's start time
//this tween is added
tl.staggerFrom(icons, 0.2, {scale:0, autoAlpha:0}, 0.1, "stagger");

/* --- Control playback methods --- */

$("#play").click(function() {;
$("#pause").click(function() {
$("#reverse").click(function() {
$("#resume").click(function() {

$("#stagger").click(function() {"stagger");	
$("#restart").click(function() {

//when the timeline updates, call the updateSlider function
tl.eventCallback("onUpdate", updateSlider);
  range: false,
  min: 0,
  max: 100,
  slide: function ( event, ui ) {
    //adjust the timeline's progress() based on slider value
    tl.progress( ui.value/100 );
function updateSlider() {
  $("#slider").slider("value", tl.progress() *100);