123

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 width="800px" height="400px" viewBox="0 102.6 800 400" enable-background="new 0 102.6 800 400" xml:space="preserve">
<g id="frontGear">
	<path d="M279.4,302.4c0,45.6-37,82.7-82.7,82.7c-45.6,0-82.7-37-82.7-82.7s37-82.7,82.7-82.7C242.3,219.7,279.4,256.7,279.4,302.4z
		 M196.7,261c-22.7,0-41.3,18.7-41.3,41.3s18.7,41.3,41.3,41.3c22.7,0,41.3-18.7,41.3-41.3S219.3,261,196.7,261z"/>
	<polygon points="201.8,204.2 191.6,204.2 186.4,224.8 206.9,224.8 	"/>
	<polygon points="191.6,400.6 201.8,400.6 206.9,379.9 186.4,379.9 	"/>
	<polygon points="294.9,307.5 294.9,297.2 274.2,292.1 274.2,312.6 	"/>
	<polygon points="98.5,297.2 98.5,307.5 119.1,312.6 119.1,292.1 	"/>
	<polygon points="289.4,269.6 285.3,260 264.3,263.2 272.1,282.2 	"/>
	<polygon points="103.9,335.1 108.1,344.7 129.1,341.6 121.3,322.5 	"/>
	<polygon points="285.3,344.7 289.4,335.1 272.1,322.5 264.3,341.6 	"/>
	<polygon points="108.1,260 103.9,269.6 121.3,282.2 129.1,263.2 	"/>
	<polygon points="163.9,209.6 154.4,213.7 157.5,234.7 176.5,227 	"/>
	<polygon points="229.4,395.1 239,391 235.9,370 216.9,377.8 	"/>
	<polygon points="130.7,229.3 123.6,236.4 134.7,254.7 149.1,240.4 	"/>
	<polygon points="262.7,375.5 269.8,368.3 258.7,350 244.3,364.4 	"/>
	<polygon points="239,213.7 229.4,209.6 216.9,227 235.9,234.7 	"/>
	<polygon points="154.4,391 163.9,395.1 176.5,377.8 157.5,370 	"/>
	<polygon points="269.8,236.4 262.7,229.3 244.3,240.4 258.7,254.7 	"/>
	<polygon points="123.6,368.3 130.7,375.5 149.1,364.4 134.7,350 	"/>
</g>
<g id="backGear">
	<path d="M762,302.4c0,45.6-37,82.7-82.7,82.7c-45.6,0-82.7-37-82.7-82.7s37-82.7,82.7-82.7C725,219.7,762,256.7,762,302.4z
		 M679.3,261c-22.7,0-41.3,18.7-41.3,41.3s18.7,41.3,41.3,41.3c22.7,0,41.3-18.7,41.3-41.3S702,261,679.3,261z"/>
	<polygon points="684.5,204.2 674,204.2 668.9,224.8 689.6,224.8 	"/>
	<polygon points="674,400.6 684.5,400.6 689.6,379.9 668.9,379.9 	"/>
	<polygon points="777.4,307.5 777.4,297.2 756.7,292.1 756.7,312.6 	"/>
	<polygon points="581.1,297.2 581.1,307.5 601.8,312.6 601.8,292.1 	"/>
	<polygon points="772.1,269.6 768,260 747,263.2 754.7,282.2 	"/>
	<polygon points="586.6,335.1 590.7,344.7 611.5,341.6 603.8,322.5 	"/>
	<polygon points="768,344.7 772.1,335.1 754.7,322.5 747,341.6 	"/>
	<polygon points="590.7,260 586.6,269.6 603.8,282.2 611.5,263.2 	"/>
	<polygon points="646.4,209.6 636.8,213.7 640,234.7 659.2,227 	"/>
	<polygon points="712.1,395.1 721.7,391 718.5,370 699.5,377.8 	"/>
	<polygon points="613.4,229.3 606.3,236.4 617.3,254.7 631.7,240.4 	"/>
	<polygon points="745.1,375.5 752.4,368.3 741.2,350 726.8,364.4 	"/>
	<polygon points="721.7,213.7 712.1,209.6 699.5,227 718.5,234.7 	"/>
	<polygon points="636.8,391 646.4,395.1 659.2,377.8 640,370 	"/>
	<polygon points="752.4,236.4 745.1,229.3 726.8,240.4 741.2,254.7 	"/>
	<polygon points="606.3,368.3 613.4,375.5 631.7,364.4 617.3,350 	"/>
</g>
<g id="id0" class="circle">
	<circle id="circlepath_14_" fill="none" cx="196.7" cy="302.4" r="206.7"/>
	<g id="chain">
		<rect x="178.5" y="200" fill="#58595B" width="36.2" height="12.9"/>
		<circle fill="#58595B" cx="214.9" cy="206.5" r="10.3"/>
		<path fill="#FFFFFF" d="M214.9,198.7c4.3,0,7.8,3.5,7.8,7.8c0,4.3-3.5,7.8-7.8,7.8s-7.8-3.5-7.8-7.8
			C206.9,202.3,210.4,198.7,214.9,198.7z"/>
		<circle fill="#58595B" cx="178.5" cy="206.5" r="10.3"/>
		<rect x="178.5" y="202.7" fill="#FFFFFF" width="36.2" height="7.8"/>
		<circle fill="#FFFFFF" cx="178.5" cy="206.5" r="7.8"/>
		<path fill="#58595B" d="M214.9,201.3c2.8,0,5.1,2.3,5.1,5.1c0,2.8-2.3,5.1-5.1,5.1c-2.8,0-5.1-2.3-5.1-5.1
			C209.7,203.7,211.9,201.3,214.9,201.3z"/>
		<path fill="#58595B" d="M178.5,201.3c2.8,0,5.1,2.3,5.1,5.1c0,2.8-2.3,5.1-5.1,5.1c-2.8,0-5.1-2.3-5.1-5.1
			C173.5,203.7,175.7,201.3,178.5,201.3z"/>
	</g>
</g>
<g id="Crank">
	<path fill="none" d="M382.7,302.4c0,102.8-83.2,186-186,186s-186-83.2-186-186c0-102.8,83.2-186,186-186S382.7,199.5,382.7,302.4z"
		/>
	<g>
		<path d="M31.3,320.6c-9.8,0-18.2-7.9-18.2-18.2c0-10.1,7.9-18.2,18.2-18.2l165.3-5.1c12.9,0,23.1,10.3,23.1,23.1
			c0,12.9-10.3,23.1-23.1,23.1L31.3,320.6z M196.7,294.6c-4.3,0-7.8,3.3-7.8,7.8c0,4.5,3.3,7.8,7.8,7.8c4.5,0,7.8-3.3,7.8-7.8
			C204.5,297.9,201,294.6,196.7,294.6z M31.3,297.2c-2.8,0-5.1,2.3-5.1,5.1c0,2.8,2.3,5.1,5.1,5.1c2.8,0,5.1-2.3,5.1-5.1
			C36.5,299.6,34.1,297.2,31.3,297.2z"/>
		<path fill="#FFFFFF" d="M196.7,281.7c11.4,0,20.7,9.3,20.7,20.7c0,11.4-9.3,20.7-20.7,20.7l-165.3-5.1c-8.6,0-15.5-6.9-15.5-15.5
			c0-8.6,6.9-15.5,15.5-15.5L196.7,281.7 M196.7,312.6c5.8,0,10.3-4.6,10.3-10.3c0-5.6-4.6-10.3-10.3-10.3
			c-5.6,0-10.3,4.6-10.3,10.3C186.4,308,190.9,312.6,196.7,312.6 M31.3,310.1c4.3,0,7.8-3.3,7.8-7.8c0-4.5-3.3-7.8-7.8-7.8
			c-4.3,0-7.8,3.3-7.8,7.8C23.6,306.8,27,310.1,31.3,310.1 M196.7,276.6L196.7,276.6L196.7,276.6l-165.3,5.1
			c-11.4,0-20.7,9.3-20.7,20.7c0,11.4,9.3,20.7,20.7,20.7l165.3,5.1l0,0l0,0c14.2,0,25.8-11.6,25.8-25.8
			C222.5,288.1,210.9,276.6,196.7,276.6L196.7,276.6z M196.7,307.5c-2.8,0-5.1-2.3-5.1-5.1c0-2.8,2.3-5.1,5.1-5.1
			c2.8,0,5.1,2.3,5.1,5.1C201.8,305.2,199.5,307.5,196.7,307.5L196.7,307.5z M31.3,305c-1.5,0-2.6-1-2.6-2.6c0-1.7,1-2.6,2.6-2.6
			c1.7,0,2.6,1,2.6,2.6C34,304,32.8,305,31.3,305L31.3,305z"/>
	</g>
	<g>
		<path fill="#FFFFFF" d="M77.4,309.3c-0.7,0.3-2.2,0.7-4.2,0.7c-5.7,0-8.6-3.5-8.6-8.2c0-5.6,4-8.7,8.9-8.7c1.9,0,3.4,0.4,4,0.7
			l-0.8,2.9c-0.8-0.3-1.8-0.6-3.1-0.6c-2.9,0-5.2,1.8-5.2,5.4c0,3.3,1.9,5.3,5.2,5.3c1.1,0,2.4-0.2,3.1-0.5L77.4,309.3z"/>
		<path fill="#FFFFFF" d="M79.9,293.6c1.2-0.2,3-0.3,4.9-0.3c2.4,0,4.1,0.4,5.3,1.3c1,0.8,1.5,1.9,1.5,3.4c0,2.1-1.5,3.5-2.9,4v0.1
			c1.1,0.5,1.8,1.6,2.2,3.1c0.5,1.8,1,4,1.3,4.6h-3.8c-0.3-0.5-0.7-1.8-1.1-3.8c-0.4-2-1.1-2.6-2.6-2.6h-1.1v6.4h-3.7V293.6z
			 M83.5,300.6H85c1.8,0,2.9-0.9,2.9-2.4c0-1.5-1-2.3-2.7-2.3c-0.9,0-1.4,0.1-1.7,0.1V300.6z"/>
		<path fill="#FFFFFF" d="M98.3,305.5l-1.2,4.2h-3.8l5-16.4h4.9l5.1,16.4h-4l-1.3-4.2H98.3z M102.5,302.7l-1-3.5
			c-0.3-1-0.6-2.2-0.8-3.2h0c-0.2,1-0.5,2.2-0.8,3.2l-1,3.5H102.5z"/>
		<path fill="#FFFFFF" d="M110.4,309.7v-16.4h4.3l3.4,6c1,1.7,1.9,3.8,2.7,5.6h0.1c-0.2-2.2-0.3-4.4-0.3-6.8v-4.8h3.4v16.4h-3.9
			l-3.5-6.3c-1-1.7-2-3.9-2.8-5.8l-0.1,0c0.1,2.2,0.1,4.5,0.1,7.1v4.9H110.4z"/>
		<path fill="#FFFFFF" d="M127.2,293.4h3.7v7.2h0.1c0.4-0.6,0.8-1.2,1.1-1.8l3.7-5.4h4.5l-5.4,7l5.7,9.4h-4.3l-4-7.1l-1.4,1.7v5.3
			h-3.7V293.4z"/>
		<path fill="#FFFFFF" d="M141.5,307.8c0-1.3,0.9-2.2,2.2-2.2s2.1,0.9,2.2,2.2c0,1.3-0.8,2.2-2.2,2.2
			C142.4,310,141.5,309,141.5,307.8z M142.3,304.3l-0.6-11h3.9l-0.5,11H142.3z"/>
	</g>
</g>
</svg>

            
          
!
            
              $time: 2500ms;
$timedegrees: $time/16;
$distance: -482px;
$numRotate: infinite;
svg {
  width: 100%;
  height: 100%;
}

#frontGear,
#backGear {
        -webkit-animation: CCW $time $numRotate; /* Safari 4+ */
    -webkit-transform-origin:50% 50%; /* Chrome, Safari, Opera */
  animation-timing-function: linear;

}

#Crank {
      -webkit-animation: CCW $time $numRotate; /* Safari 4+ */
    -webkit-transform-origin:50% 50%; /* Chrome, Safari, Opera */
  animation-timing-function: linear;
 }

.circle {
      -webkit-animation: path $time*2.5 $numRotate; /* Safari 4+ */
  -webkit-transform-origin:50% 50%; /* Chrome, Safari, Opera */
  animation-timing-function: linear;
  
}
#id0 {
  -webkit-animation-delay: $timedegrees;
}


@-webkit-keyframes CCW {
    0%   {
      -webkit-transform: rotate(0deg);
    }
    100%   {
      -webkit-transform: rotate(-360deg);
   }
}


@-webkit-keyframes path {
    0%   {
            -webkit-transform: rotate(0deg) translate(0,0);
    }
    20%   {
            -webkit-transform: rotate(-180deg) translate(0,0);
    }
    50%   {
            -webkit-transform: rotate(-180deg) translate($distance,00px);
    }
    70%   {
            -webkit-transform: rotate(-180deg) translate($distance,00px) rotate(-180deg) ;
    }
    100%   {
            -webkit-transform: rotate(-180deg) translate(0px,00px) rotate(-180deg) ;
    }
}

            
          
!
            
              var timing = 2500/16;
var chains = 40;
var c = 0;
  var cloned;
$(function() {
    var intervalID = setInterval(function() {
   cloned = $( '#id'+ c );
      $("#id"+c).clone().attr('id', 'id'+(++c) ).insertAfter( cloned );
    }, timing);
    setTimeout(function() {
        clearInterval(intervalID);
    }, timing*chains);
});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console