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

              
                <svg id="cycle" xmlns="http://www.w3.org/2000/svg" width="353.667" height="178.334">
  <path fill="none" stroke="#000" stroke-miterlimit="10" d="M145 39.5h95"/>
  <g id="pedal" fill="none" stroke="#000" stroke-miterlimit="10">
    <path d="M156.333 80L169 103.5"/>
    <path d="M149.667 80l14.666-1.333"/>
  </g>
  <g id="rear-tire" stroke-miterlimit="10">
    <circle cx="76" cy="103" r="72" fill="#150db5" stroke="#fff"/>
    <g fill="none" stroke="snow">
      <path d="M75.5 31v144"/>
      <path d="M3 104.5h144"/>
    </g>
  </g>
  <g id="front-tire" stroke-miterlimit="10">
    <circle cx="276" cy="103" r="72" fill="#150db5" stroke="#fff"/>
    <g fill="none" stroke="snow">
      <path d="M237.219 42.483l78.519 120.71"/>
      <path d="M216.522 143.627l120.71-78.519"/>
    </g>
  </g>
  <path fill="none" stroke="#000" stroke-miterlimit="10" d="M76 103l46-92"/>
  <path fill="none" stroke="#000" stroke-miterlimit="10" d="M276 103.5H169"/>
  <path fill="none" stroke="#000" stroke-miterlimit="10" d="M276 103l-59-91.5"/>
</svg>
<svg id="car" xmlns="http://www.w3.org/2000/svg" width="384" height="149">
  <g fill="#fff" stroke="#000" stroke-miterlimit="10">
    <circle cx="286.75" cy="111.25" r="20.5"/>
    <path d="M31.256 78.176l.77-15.75S29.501 59 49.005 59.278C69 61.75 99.329 37.857 109.664 38.311c59.586-10.061 92.44 4.054 92.44 4.054l32.112 18.632s68.018 8.906 79.65 17.33c13.883.424 14.481 3.69 14.481 3.69l2.292 20.243.203 10.361s-12.354 7.149-22.96 2.184c0 0-19.472-58.305-44.353 0C268.771 117.557 201.25 119 115 114.5c-25.25-57.75-53.645-1.734-53.645-1.734s-5.567-.313-22.069-1.222C24 114.75 26.073 94.725 25.87 88.78c-.62-5.03 5.386-10.604 5.386-10.604z"/>
    <circle cx="89.75" cy="114.25" r="20.5"/>
  </g>
</svg>

              
            
!

CSS

              
                #car {
  margin-left:300px;
}
              
            
!

JS

              
                function sceneOne(){
var tl = new TimelineMax();
tl.add("go");
tl.to("#rear-tire",2,{rotation: 360,transformOrigin: "50% 50%",repeat:-1});
tl.to("#front-tire",2,{rotation: 360,transformOrigin: "50% 50%",repeat:-1},"go");

tl.fromTo("#cycle",3,{x:0},{x:300},"go");
  return tl;
  }
function sceneTwo(){
  var tl=new TimelineMax();
  tl.to("#car", 3, {x:200});
  return tl;
}

var master = new TimelineMax();
master.add(sceneOne())
      .add(sceneTwo(), 3 );
              
            
!
999px

Console