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

              
                		<div id="wrapper">
		<svg xmlns="http://www.w3.org/2000/svg" class="carl" viewBox="0 0 720 409" >
			<path id="man02" stroke="#000" d="M334.747 130.07c3.323 45.656-34.512 81.19-71.278 72.68-12.08-4.753 3.53-16.548 3.53-25.563 0-19.29-5.7-36.78-14.94-49.625 7.19-18.79.74-62.98-.66-83.843-11.4 23.19-15.43 43.3-23.25 64.71-4.53-1.7-9.29-2.63-14.22-2.63-7.21 0-14.08 1.93-20.34 5.44-9.25-32.83-17.21-35.29-26.28-47.28-3.08 25.09-1.51 49.13 3.03 72.56-5.96 11.54-9.47 25.54-9.47 40.65 0 2.38.11 4.71.28 7.03-16.17-19.09-27.74-.03-40.03-40.72-5.75 54.62 41.98 30.19-20.28 143.08 45.71-34.67 43.35 6.4 56.68 19.63 7.36-26.61 23.34-24.11 34.93-2.06 7.16-11.73 13.77-19.4 20.03-24.28 30.13 46.86 59.6 67.54 85.84 72.21-4.3 9.713-4.74 18.44 4.65 24.03.23-6.11 8.68-14.74 13.37-23.25 11.21-1.06 21.605-4.956 30.97-10.72 5.94 8.522 11.925 16.53 18.715 15.69l-1.813-29.068c12.79-12.636 22.414-28.54 27.81-43.595-25.05-1.25-50.884-4.323-85.22-27.624 20.373-4.996 20.4-11.99 31.375-.876 48.5-16.972 32.62-7.9 53.5 5.81 30.475-10.56 10.93-25.15 50.52-7.22-65-44.92-101.39-69.123-107.49-125.203z"/>

			<path id="man01" stroke="#000" d="M385.75.97c-4.646 67.97-60.014 167.256-122.28 201.78 2.265-7.94 3.53-16.548 3.53-25.563 0-19.29-5.693-36.78-14.938-49.625 7.19-18.79.74-62.98-.656-83.843-11.394 23.19-15.428 43.3-23.25 64.71-4.53-1.7-9.29-2.63-14.22-2.63-7.206 0-14.076 1.93-20.342 5.44-9.245-32.83-17.21-35.29-26.28-47.28-3.08 25.09-1.51 49.13 3.03 72.56-5.96 11.54-9.47 25.54-9.47 40.65 0 2.38.113 4.71.282 7.03-16.168-19.09-30.926-47.84-43.22-88.54C99.442 191.75 62.7 294.82.438 407.71c45.712-34.67 84.795-89.22 142.75-87.15 7.367-26.6 21.75-36.85 49.283-16.4 7.17-11.73 13.78-19.392 20.03-24.28 30.13 46.868 59.6 67.545 85.85 72.22-4.29 9.72-4.73 18.44 4.66 24.03.23-6.11 8.68-14.73 13.38-23.25 11.21-1.05 21.61-4.95 30.97-10.71 5.94 8.53 11.93 16.53 18.72 15.69l-1.81-29.063c12.79-12.635 22.42-28.538 27.82-43.59-25.05-1.25-50.88-4.328-85.22-27.63 20.38-4.995 36.34-2.43 47.32 8.688 48.5-16.973 54.93 12.825 75.81 26.535 140.45-52 226.1 51.353 288 88.41C594.36 166.55 489.53 80.125 385.75.97z"/>
			<g id="g3009">
			  <path id="path2999" fill="#f76f27" d="M278.186 282.655c0 12.457-10.098 22.556-22.556 22.556-12.457 0-22.556-10.09-22.556-22.55s10.1-22.55 22.556-22.55c11.75 0 21.534 9.03 22.482 20.74"/>
			  <path id="path3001" fill="#fff" d="M262.18 289.775c-14.504 7.17-12.663-23.243-.72-14.03l2.16-6.116c-24.382-11.47-27.53 37.25 1.44 26.62z"/>
			</g>
			<path id="path3830-7" fill="#fff" stroke="#000" d="M184.256 220.44l7.58 4.42 29.055-5.052 5.06-8.21-.63 13.263-34.11 5.06z"/>
			<path id="path3850" fill="#fff" stroke="#000" stroke-width="3" d="M157.65 187.987c-2.767-9.545-1.31-17.18 11.447-13.826l15.475 2.7c3.914.27 8.91 4.15 7.895 9.79l6.67-2.06c-.277-5.48 1.824-7.82 6.594-9.93l30.64-12.31c3.63.03 7.64-.59 8.84 3.48L264 157.8l1.04 5.464-19.51 7.93L243 189.5c-1.84 5.043-8.1 5.266-13.26 7.264l-18.63 1.893c-5.44.687-7.15-1.27-10.1-3.475l-1.54-5.74-6.58 1.58-1.99 5.424c-1.31 3-3.15 3.41-5.05 3.475l-16.233-.05c-12.55 2.04-10.024-6.71-11.95-11.87z"/>
		</svg>
		</div>
              
            
!

CSS

              
                #wrapper {
  position: absolute;
  width: 80%;
  height: 80%;
  background: #efefef;
}
.carl{
  position: relative;
  top: 0;
  left: 0;
  width: 200px;
  
}
#man02{visibility: hidden;}
              
            
!

JS

              
                // These events and people are fictional and any resemblance to person living or dead is purely coincidental.

TweenMax.to("#man01",0.3, {morphSVG:"#man02",repeat:-1, yoyo: true, repeatDelay:0.1, ease: Bounce.easeInOut});
	
	var width = $('#wrapper').width(),
		height = $('#wrapper').height(), 
		CARL = new TimelineMax();			

	function flying () {
		
		CARL.to('.carl', 2, { x:randomNumber(-100, width-100), y:randomNumber(-100, height-100), scale:randomNumber(0.5, 1), ease:Quad.easeInOut, force3D:true, onComplete:flying});
		
		function randomNumber(min, max) {
			return Math.floor(Math.random() * (1 + max - min) + min);
		}
    
	}
	flying ();

 
              
            
!
999px

Console