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

              
                <p>The desired effect is that the timeline starts with all boxes faded out and then they will progressively fade in in sequence.</p>
<p>The default behavior of immediateRender:true on from() tweens allows tweens that are scheduled to run in the future to render their beginning state immediately.</p>
<p>When immediateRender is set to false, the boxes will all stay on the left and then jump suddenly to the right and begin fading in and moving when their tweens are scheduled to run, which isn't ideal in most situations</p>
<button id="renderTrue">play with immediateRender true (good)</button>
<button id="renderFalse">play with immediateRender false</button>
<div class="box" id="red"></div>
<div class="box" id="green"></div>
<div class="box" id="blue"></div>

<p>99% of the time immediateRender:true (the default) will provide the desired results</p>
<p>If you are doing multiple from() tweens on the same properties of the same object, then you may need to set immediateRender:false .</p>
              
            
!

CSS

              
                body
	background-color:#000;
}
#demo {
	width: 692px;
	height: 60px;
	background-color: #333;
	padding: 8px;
}

.box {
	position: relative;
	width: 60px;
	height: 60px;
	margin:10px;
	
}
#red{
	background-color: red;
}
#yellow{
	background-color: yellow;
}
#green{
	background-color: green;
}
#blue{
	background-color: blue;
}
#pink{
	background-color: pink;
}
#purple{
	background-color: purple;
}

p {
  width:720px;
}
              
            
!

JS

              
                var tl = new TimelineLite();


function createTimeline(immediateRender) {
  tl.clear().progress(0);
  TweenLite.set(".box", {clearProps:"all"});
  tl.from("#red", 1, {opacity:0, left:200, immediateRender:immediateRender})
    .from("#green", 1, {opacity:0, left:200, immediateRender:immediateRender})
    .from("#blue", 1, {opacity:0, left:200, immediateRender:immediateRender})
  
}

$("#renderTrue").click(function() {
  createTimeline(true);
})


$("#renderFalse").click(function() {
  createTimeline(false);
})
              
            
!
999px

Console