Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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

Auto Save

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="tractor">
  <div class="body">
    <div class="exhaust"></div>
    <div class="ventilation"></div>
  <div class="window"></div>  
  <div class="wheel"></div>    
    <div class="wheel-inner"></div>
    <div class="wheel-small"></div>
    <div class="wheel-small-inner"></div>
  </div>
  
</div>

              
            
!

CSS

              
                #tractor{
  background:#dddddd;
  width:100%;
  min-height:600px;
  position:relative;
  text-align:center;
  padding-top:200px;
}

#tractor .exhaust{
  width:18px;
  height:61px;
  background:#000000;
  position:absolute;
  top:-60px;
  right:20px;
  background-image:linear-gradient(to right, transparent 4px, rgba(255,255,255,0.5) 11px, transparent 14px);
  
}

#tractor .ventilation{
  width:100%;
  height:45px;
  position:absolute;
  top:50px;
  right:0px;
  background-image:linear-gradient(to right, transparent 210px, rgba(0,0,0,0.3) 225px, transparent 230px, transparent 235px, rgba(0,0,0,0.3) 250px, transparent 20px);
  box-shadow:15px 0 0 #000000;
}



#tractor .body {
  position:relative;
  width: 430px;
  height: 120px;
  margin:0 auto;
  border-radius:0 5px 5px 0;
  background: #2f783c;
  background-image:    
 linear-gradient(to bottom, transparent 30px, rgba(255,255,255,0.1) 30px, rgba(46,118,58,0.9) 200px, transparent 200px),
    linear-gradient(to right, transparent 46px, rgba(0,0,0,0.3) 48px, transparent 48px), linear-gradient(to bottom, rgba(255,255,255,0) 12px, rgba(255,255,255,0.2) 17px, rgba(255,255,255,0.2) 19px, rgba(255,255,255,0) 24px),
    linear-gradient(to bottom, rgba(242,192,18,0) 28px, rgba(242,192,18,0.7) 28px, rgba(242,192,18,0.7) 31px, transparent 36px );
  
  overflow:visible;
  box-shadow: 0 20px 0 #245c2e, 0 18px 8px -3px rgba(0,0,0,0.3);
  border-right:#000 solid 10px;
}

#tractor .window {
  position:absolute;
  top:-110px;
  width: 180px;
  height: 220px;
  margin:0 auto;
  border-radius:15px 15px 6px 0;
  background: #2f783c;
  background-image:  
   linear-gradient(to right, #2f783c 11px, #205429 15px, #205429 17px, #136021 17px, #136021 20px, #205429 20px, #205429 22px, #245c2e 22px, #245c2e 32px, transparent 32px, transparent 83px,   transparent 90px),
    linear-gradient(to left, #2f783c 11px, #205429 15px, #205429 17px, #136021 17px, #136021 20px, #205429 20px, #205429 22px, #245c2e 22px, #245c2e 32px, transparent 32px, transparent 75px, transparent 95px),
    linear-gradient(to bottom, transparent 114px, #2f783c 114px, #2f783c 118px, transparent 118px),  
 
    /*Window*/
    linear-gradient(to bottom, transparent 25px, rgba(255,255,255,0.4) 25px, rgba(255,255,255,0.9) 180px, transparent 180px);
  
  box-shadow: 0 20px 0 #245c2e, 0 18px 8px 1px rgba(0,0,0,0.3);
  overflow:visible;
}

#tractor .wheel {
  background:#000;
  display: block;
  border-radius:50%;
content: '';
position: absolute;
  width:200px;
  height: 200px;
  top:35px;
  left:-90px;
    -webkit-animation: rotating 2s linear infinite;
    background-image:linear-gradient(to right, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(76deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-76deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(60deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-60deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(42deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-42deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-24deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(25deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-9deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(7deg, transparent 44%, #000 44%, #111 55%, transparent 55%);
   
}

#tractor .wheel-inner{
  
  background:none;
  display: block;
  border-radius:50%;
content: '';
position: absolute;
  width:200px;
  height: 200px;
  top:35px;
  left:-90px;
   background-image:  /*big yellow circle*/
      radial-gradient(circle at 100px 100px, #f3c114 18%, rgba(255,255,255,0.1) 28%), 
      /*shadow between yellow circles */
      radial-gradient(circle at 120px 100px, #000 -90%, rgba(0,0,0,0.1) 50%), 
      /*small yellow circle*/
      radial-gradient(circle at 100px 100px, #f3c114 48%, rgba(0,0,0,0.1) 50%);
  
  box-shadow:inset 0px 11px 6px rgba(255,255,255,0.3), 10px -12px 12px 5px rgba(0,0,0,0.3), 17px -20px 1px 5px rgba(47,120,60,1);
}



#tractor .wheel-small {
  background:#000;
  display: block;
  border-radius:50%;
content: '';
position: absolute;
  width:130px;
  height: 130px;
  top:85px;
  left:285px;
    -webkit-animation: rotating 1s linear infinite;
    background-image:linear-gradient(to right, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(76deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-76deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(60deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-60deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(42deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-42deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-24deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(25deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(-9deg, transparent 45%, #000 45%, #111 55%, transparent 55%), linear-gradient(7deg, transparent 44%, #000 44%, #111 55%, transparent 55%);
  
    -webkit-animation: rotating 2s linear infinite;
}
#tractor .wheel-small-inner{
  background:none;
  display: block;
  border-radius:50%;
content: '';
position: absolute;
  width:130px;
  height: 130px;
  top:85px;
  left:285px;
    background-image:radial-gradient(circle at 65px 65px, #f3c114 18%, rgba(255,255,255,0.1) 28%), radial-gradient(circle at 80px 80px, #000 -90%, rgba(0,0,0,0.1) 50%), radial-gradient(circle at 65px 65px, #f3c114 48%, rgba(0,0,0,0.1) 50%);
  
  box-shadow:inset 0px 11px 6px rgba(255,255,255,0.3), -13px -10px 7px -3px rgba(0,0,0,0.3),-16px -20px 1px -1px rgba(47,120,60,1);
}


@-webkit-keyframes rotating {
    from{
        -webkit-transform: rotate(0deg);
    }
    to{
        -webkit-transform: rotate(360deg);
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console