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

+ 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 class="slide"></div>

<button id="start">Slide Forward</button>
<button id="go2">Slide Back, then Rotate</button>
<button id="go3">Reverse Rotate, then Round Corners</button>
<button id="restart">Reverse Corners, Scale Down, then Reverse All</button>


  display: block;
  height: 200px !important;
  width: 200px !important;
  background: red; 

button {
  padding: 2rem;
  font-size: 1.5rem;
  margin: 1rem 1rem 0 0;



                function tm1(){
  var tl1 = new TimelineMax({paused: true});'.slide', 1, {x: "500"});
  return tl1;

function tm2(){
  var tl2 = new TimelineMax({paused: true});'.slide', 1, {rotation: 90});
  return tl2;

function tm3(){
  var tl3 = new TimelineMax({paused: true});'.slide', 1, {borderRadius: "100px"});
  return tl3;

function tm4(){
  var tl4 = new TimelineMax({paused: true});'.slide', 1, {scale: .5});
  return tl4;

var master = new TimelineMax({paused:true});
var ani1 = tm1();
var ani2 = tm2();
var ani3 = tm3();
var ani4 = tm4();

master.add(, 'start');
master.add(, 'go2');
master.add(, 'go3');
master.add(, 'restart')

  master.tweenFromTo('start', 'go2');

  //master.tweenFromTo('go2', 'start');
  master.tweenFromTo('go2', 'go3');

  //master.tweenFromTo('go3', 'go2');
  master.tweenFromTo('go3', 'restart');

  master.tweenFromTo('restart', 'start');

window.onload = function () {
  master.tweenFromTo('start', 'go2');