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. 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

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

              
                <!-- <a href='http://www.freepik.com/free-vector/business-moves-faster-with-a-rocket_765202.htm'>Modified Original Design by Freepik</a> -->
<div id='container'>
<svg x="0px" y="0px" viewBox="0 0 800 600" enable-background="new 0 0 800 600" xml:space="preserve">
<rect fill="#99D5E2" width="800" height="600"/>
<g id="clouds">
	<path fill="#FFFFFF" d="M93.2,85.3c0,0,0-8.3,11.4-8.1c0,0,0.5-7,6-11.1c2.1-1.6,5.4-3.1,10.3,0.4c5.6,4.1,7.7-13.5,17.7-2.5
		c0,0,5.5-10,16.5-11.6c19.5-2.9,19.5,11.6,21.6,11.3c27.1-4.4,21.9,17.5,21.9,17.5s9.9,5.7-4.5,8s-22.2-2-22.2-2
		s-23.2,8.3-37.3,3.3c0,0-29.9,3.4-35.6-0.9c0,0-5.5,3.4-9,0C86.4,86.2,87,85.1,93.2,85.3"/>
	<path fill="#FFFFFF" d="M436.6,281.7c0,0,3.9-10.5-7.2-19c3.5-3.4-11.9-7.3-11.9-7.3s5.3-21.3-21.9-26.5c-27.2-5.2-36,18.6-36,18.6
		c-0.9-4.1-4-13.9-19.8-14.3c-15.8-0.4-16.2,16.2-16.2,16.2c-7.2-0.1-9.9,4.8-10.8,8.5c-1.2-0.1-2.5-0.1-3.8-0.1
		c-26-0.4-26.7,17.5-26.7,17.5c-18.8-0.2-18.8,13.4-18.8,13.4c-10.1-0.4-37.5,1.4-31.7,7c5.8,5.6,41.1,0,41.1,0
		c9.4,7,58.5,1.5,58.5,1.5c23.2,8.2,61.2-5.5,61.2-5.5s32.5,3.8,56.3,0C472.7,287.8,436.6,281.7,436.6,281.7z"/>
</g>
<g id="guy">
	<g id="jetpack">
		<g id="flame">
			<path fill="#F0D61D" d="M614.6,234.7c0,0,7.9,8.3,8.4,8.9c0.5,0.6,2-5.9,2-5.9s8.8,5.7,10.5,6.6c0,0-1.3-5-1.4-7.6
				c0,0,23.6-1.9,28.4-3c0,0-21.7-18.8-23.7-18.8c0,0,2-2.5,2.8-3.6c0.7-1.1-11.3,0.5-11.3,0.5s2.1-5,2.4-6.9l-10.5,2
				C622.2,206.8,615.5,229.3,614.6,234.7"/>
			<path fill="#FFEB80" d="M615.8,230.1c0,0,5.3,5.5,5.6,5.9c0.3,0.4,1.4-3.9,1.4-3.9s5.9,3.8,7.1,4.4c0,0-0.9-3.3-0.9-5.1
				c0,0,15.8-1.3,19-2c0,0-14.5-12.6-15.9-12.6c0,0,1.4-1.7,1.8-2.4c0.5-0.7-7.6,0.3-7.6,0.3s1.4-3.4,1.6-4.6l-7,1.4
				C620.9,211.4,616.4,226.5,615.8,230.1"/>
		</g>
		<path fill="#C9F2FF" d="M560.3,177.7c0,11-4.7,19.4-8.9,24.7c13.5,16.2,52.3,30.1,52.3,30.1c15.4-21.1,13.9-34.4,13.9-34.4
			C588.4,184.6,570.9,177.2,560.3,177.7"/>
		<path fill="#71A3AC" d="M601.5,231.3l1,2.1c0,0,7.7,3.4,8.4,3.7c0,0,18.1-21.6,15.6-37.6c0,0-7.6-3.4-9-2.8l-1.4,0.7
			C616.2,197.5,614.7,213.3,601.5,231.3"/>
		<path fill="#C95E15" d="M593.2,228.7c0,0,10.3-12.8,15.6-35.3l-5.9-3.1c0,0-2.4,13.5-15.7,35.2L593.2,228.7z"/>
		<path opacity="0.53" fill="#FFFFFF" d="M552.5,185.5c0,0,3.5-7.4,15.2-5c11.7,2.4,37.1,14.1,46,18.2l-0.7,3.5
			C613,202.2,559.3,174.5,552.5,185.5"/>
		<path fill="#C95E15" d="M560.3,177.7c-6.5,0.3-12,6.6-12.9,10.5c-1.2,4.9,0.1,9.6,3.9,14.2C555.6,197.1,560.3,188.7,560.3,177.7"
			/>
	</g>
	<g id="rightHand">
		<path fill="#F1F2F2" d="M557.7,244.9l-4.4,3.1c0,0,5.8,3.2,7.8,1.4L557.7,244.9z"/>
		<path fill="#A7A9AC" d="M554.3,247.6c0,0,5.5,2.4,6.5,1.8c1-0.6-2.1-4.9-2.1-4.9L554.3,247.6z"/>
		<g>
			<path fill="#EABE96" d="M556.9,245.6c-0.2-2.7-3.8-4.6-3.8-4.6l-9.4,7.3c-1.2-2.5-3.5-5.1-4.6-3.9c-1.1,1.1-1.9,2.6,1.4,6.3
				c0.7,0.8,1.3,1.4,1.8,1.8c-0.7,2.5-0.9,5.8,3,6.2c0,0,0.1,0,0.2-0.1c0.5-0.4,1.9-1.7,1.4-4C550,252.9,557,247.7,556.9,245.6z"/>
			<path fill="#FFDCB8" d="M533.6,250.6c-3.1,3.4-3.4,9.1,4.1,3.5C545.3,248.5,540.7,242.9,533.6,250.6"/>
			<path fill="#FFDCB8" d="M536.4,254.4c-1.8,2-3.3,4.1-1.8,5.7c1.2,1.2,2.6,0.5,6.1-2.1c3.7-2.7,4.8-5,3.8-6.8
				C543.6,249.8,540.4,250.1,536.4,254.4"/>
			<path fill="#FFDCB8" d="M540,257.9c-2.5,2.8-2.8,7.4,3.4,2.8c3-2.3,3.7-4.7,2.9-5.7C544.9,253.2,542.9,254.7,540,257.9"/>
		</g>
		<path fill="#E6E7E8" d="M549.5,243.5c0,0,9.1,2.4,9.6,5.7c0.6,3.4,8.4-5.9,8.4-5.9l-10.1-6.6L549.5,243.5z"/>
	</g>
	<g id="rightLeg">
		<path fill="#281C00" d="M704.6,296.6c0,0,8.6,8.4,11.7,13.4c3.1,4.9,11.1,6.7,13.5,2.8c2.3-3.9-10.7-27.3-12.5-29.9
			s-10,3.1-10,3.1S704.4,293.6,704.6,296.6"/>
		<path fill="#383D3F" d="M589.7,266.4c0,0,66.6,38,115.1,33.3c0,0,10.7-7.1,2.5-18.9c0,0-19.4-0.1-49.3-5.9
			c-29.8-5.8-55.8-14.3-60.1-15.8L589.7,266.4z"/>
	</g>
	<g id="leftLeg">
		<path fill="#382B19" d="M709.3,281.8c0,0,8.5,2.5,15.2,5.4c6.7,2.8,15.7,8.7,19.8,4.6c4.1-4.1,2.4-7.4,2.4-7.4s-20-17.4-23.5-18.3
			c-3.5-1-11.1,3.2-11.1,3.2L709.3,281.8z"/>
		<path fill="#464B4C" d="M587.7,269.3c0,0,24.5-8.3,33-9.2c8.5-0.9,77.9,28.8,91.4,25.5c0,0,7.6-7.7,5.1-22.6
			c0,0-53.4-1.3-105.1-21.2c0,0-26,19.1-26.2,31.6L587.7,269.3z"/>
	</g>
	<path fill="#FFFFFF" d="M546.4,192c0,0,60,43.1,62.6,42.2c5.9-2,8.4,4.1,7,4.7c0,0-25.3,37-29.8,35.4
		c-20.4-7.2-36.3-55.8-58.5-59.4c0,0-0.3-6.7,2.2-9.9c2.4-3.1,3.8-10,3.8-10S536,190.3,546.4,192z"/>
	<path fill="#D1D3D4" d="M576,252.3c0.5,0.3,0.7,0.9,0.4,1.2c-0.2,0.3-0.8,0.4-1.3,0c-0.5-0.3-0.7-0.9-0.4-1.2
		S575.5,251.9,576,252.3"/>
	<path fill="#D1D3D4" d="M586.8,263.5c0.5,0.3,0.7,0.9,0.4,1.2c-0.2,0.3-0.8,0.4-1.3,0c-0.5-0.3-0.7-0.9-0.4-1.2
		C585.8,263.1,586.4,263.1,586.8,263.5"/>
	<path fill="#FFFFFF" d="M526.4,202c0,0,1,2.7,3.2,4.5c0,0,0.8,5.9,0.1,7.4c0,0-5.3-4.4-6.6-6.1L526.4,202z"/>
	<polygon fill="#D1D3D4" points="529.2,213.3 529.7,209.2 524.2,207.9 	"/>
	<polygon fill="#E6E7E8" points="523.2,207.3 532.1,190.2 536.6,192.1 531.5,209 	"/>
	<path fill="#FFDCB8" d="M521.5,185.1c0,0,12.7,9.5,13.1,11.1c3.1,14-2.7,12.3-2.7,12.3s-11.5-9-15.4-11
		C518.2,191.8,521.5,185.1,521.5,185.1"/>
	<polygon fill="#A7A9AC" points="530.5,203 533.6,205.8 534.5,203.8 	"/>
	<path fill="#BE1E2D" d="M533.1,202.6c0,0-3.3,6.7-3.1,7c0.2,0.3,8.8,4.5,8.8,4.5s3.4-2.1,3-2.7c-0.4-0.6-6-7.5-6-7.5"/>
	<path fill="#F1F2F2" d="M532.2,190.2c0,0-2,10.9-2,12.6c0,0,9.6,2.1,11.2,2.2c0,0-2.4-11.7-3.7-13.8L532.2,190.2z"/>
	<path fill="#D1D3D4" d="M566.9,240.6c0.5,0.3,0.7,0.9,0.4,1.2c-0.2,0.3-0.8,0.4-1.3,0c-0.5-0.3-0.7-0.9-0.4-1.2
		S566.5,240.2,566.9,240.6"/>
	<path fill="#D1D3D4" d="M556.6,228.6c0.5,0.3,0.7,0.9,0.4,1.2c-0.2,0.3-0.8,0.4-1.3,0c-0.5-0.3-0.7-0.9-0.4-1.2
		C555.6,228.3,556.2,228.3,556.6,228.6"/>
	<path fill="#D1D3D4" d="M546.8,217.4c0.5,0.3,0.7,0.9,0.4,1.2c-0.2,0.3-0.8,0.4-1.3,0c-0.5-0.3-0.7-0.9-0.4-1.2
		C545.8,217.1,546.3,217.1,546.8,217.4"/>
	<g id="tie">
		<path id="path_1_" fill="#BE1E2D" d="M538.8,213.6c0,0,8.5,9.2,7.3,27.5c-0.7,10.6,7.4,33,22.6,36.6c0,0,11.6-3,12.8-5
			c0,0-3.3-9.3-4.7-11.6c0,0-21.2-2.9-23-21.8c-2.1-22.2-12.5-27.7-12.5-27.7L538.8,213.6z"/>
		<path id="path" fill="#BE1E2D" d="M541.9,211.6c0,0,3.4,23,19.5,31.7c9.4,5,20.1,10.6,15.2,25.5c0,0-4.7,10.3-7,10.3
			c0,0-6.1-7.7-7.4-10.1c0,0,3.7-12.6-11.4-24.1c-17.7-13.5-11.9-32.2-11.9-32.2L541.9,211.6z"/>
	</g>
	<g id="head">
		<g id="neckHair">
			<path fill="#725C2B" d="M533,187.9c0,0,5,4,4.2,6.2c-0.7,2.3-7,1.6-8.8,0.9c0,0,3.6,3.1,1.7,4.3c-1.8,1.2-10.6-4.9-10.6-4.9
				S520.3,186.6,533,187.9"/>
			<path fill="#725C2B" d="M534.4,192.3c0,0,1.9,6.1,0,7.5c-1.9,1.5-6.7-2.6-7.7-4.2c0,0,1.2,4.6-1,4.5c-2.2-0.1-5.8-7.8-5.8-7.8
				S524.6,184,534.4,192.3"/>
		</g>
		<path fill="#FFDCB8" d="M486,140.5c0,0-9.9,26.3-12.9,33.9c-3,7.6-5,21.7,6.5,25.1c11.4,3.4,31.9,4.6,38.8-3
			c7-7.6,8.4-14.1,8.4-14.1s11.4-27,3.8-37.7C523,134,491.7,129.1,486,140.5"/>
		<path fill="#CB8F5E" d="M490.5,156.5c0,0-1.8,3.6-3,3.6s-6.3,1.3-2.5,4.1c3.8,2.8,7.4,1.3,7.4,1.3s-6.7-1.2-6.9-3
			c-0.2-1.8,2.5-0.1,3.8-1.2C490.5,160,490.5,156.5,490.5,156.5"/>
		<g id="eyes">
			<path fill="#190F08" d="M505.1,155.1c-0.5,1.5-1.5,2.6-2.4,2.3c-0.9-0.3-1.2-1.7-0.7-3.3s1.5-2.6,2.4-2.3
				C505.3,152.1,505.6,153.5,505.1,155.1"/>
			<path fill="#190F08" d="M487.4,153.8c-0.5,1.5-1.5,2.6-2.4,2.3c-0.9-0.3-1.2-1.7-0.7-3.3c0.5-1.5,1.5-2.6,2.4-2.3
				C487.6,150.8,487.9,152.3,487.4,153.8"/>
		</g>
		<path fill="#753427" d="M477.7,171.4c0,0-1.3,19.4,9.1,22.5c0.1,0,0.3,0.1,0.4,0.1c3.1-13.1,18-15.6,24.5-16
			c1.1-1.9,1.7-3.1,1.7-3.1C498.6,164.9,477.7,171.4,477.7,171.4"/>
		<path fill="#DA9089" d="M487.2,193.9c11.5,3,20.8-9.8,24.5-16C505.2,178.4,490.2,180.8,487.2,193.9"/>
		<path fill="#D4C732" d="M478.1,161.4c0,0,2.7-6.7,4.5-11.6c-0.8-0.5-1.6-0.9-2.3-1.3C479.2,152.3,478.5,156.6,478.1,161.4"/>
		<g id="foreHeadHair">
			<path fill="#725C2B" d="M491.2,139.9c0,0,4.9,6.7,7,6.5c2.1-0.2,0-4,0-4s5.9,5.1,10.1,5.9c4.2,0.8,0-4.2,0-4.2s3.6,1.4,5.1,0
				C515,142.8,499.3,135.6,491.2,139.9"/>
			<path fill="#725C2B" d="M495.3,142.1c0,0,5.5,6.1,7.6,5.7c2.1-0.4-0.4-4-0.4-4s6.4,4.5,10.6,4.9c4.2,0.3-0.4-4.2-0.4-4.2
				s3.7,1,5.1-0.5C519.2,142.6,502.9,136.9,495.3,142.1"/>
		</g>
		<path fill="#F9ED32" d="M552,141.6c-1-2.5-2.4-4.9-4.2-7.1c-16.1-19.9-57-21.3-67.4,14c0.7,0.4,1.5,0.9,2.3,1.3
			c0.7-1.9,1.2-3.5,1.5-4.3c0,0,17.3-10.3,40.5,2.6c0,0,5.4,8.2,2.2,10.5C529.2,156.9,544.5,153.1,552,141.6"/>
		<path fill="#D4C732" d="M526.8,157.1c0.6,6.1-1.4,15.8-7.7,28.8c0,0,13.3,7.2,17.5,6.1c3.8-1,24.1-28.7,15.3-50.4
			c-8.4,9-17.3,13.8-26,15.9"/>
		<path fill="#493918" d="M500.7,149c0,0,6.2,0.7,9.8,5.9C510.5,154.9,505.9,145.2,500.7,149"/>
		<path fill="#493918" d="M491.7,147.9c0,0-2.4-1.3-7.6,3.4C484.1,151.3,487.9,144,491.7,147.9"/>
		<path opacity="0.73" fill="#D1D3D4" d="M529.3,153.3c0,6.3-12,11.3-26.9,11.3c-5,0-9.3-5.2-13.4-5.2c-0.8,0-4.1,1.4-5.2,1
			c-6-2.1-8.3-3.6-8.3-7.1c0-6.3,12-13.3,26.9-13.3C517.3,140,529.3,147,529.3,153.3z"/>
		<path fill="#A97C50" d="M520.2,186.3c0,0-8.7,11.2-32.5,14.8c-1.9,0.3,7.1,1.1,9.7,1.2c8.3,0.3,27.5-13.7,27.5-13.7
			S521.7,186.6,520.2,186.3z"/>
		<path fill="#231F20" d="M500.9,140.7c0,0-3.2-3.2,3-11.9c2.3-3.2,6.9-5.8,15.7-8.2c0.4-0.1,0.4-0.6-3.2-0.4
			c-12.7,0.9-26.8,14-22.2,21.2C494.4,141.9,500.9,140.7,500.9,140.7z"/>
		<path fill="#231F20" d="M510.7,142.3c0,0,0.1-12.8,18.5-19.8c0.4-0.1-1.7-1.5-4.1-1.3c-18.4,1.4-23.6,17.7-20.9,20.4L510.7,142.3z
			"/>
		<path fill="#939598" d="M484.4,145.3l-4.1,10.8l2.4-12.2c0,0,27-12.3,42,2.1c6.3,6,4.9,13.7,3.5,21c-1.9,10.1-5.7,19-6.3,19.3
			c-1,0.5-2.7-0.4-2.7-0.4s12.2-29.2,5.5-35.8C514.5,140.2,495.2,139.6,484.4,145.3z"/>
	</g>
	<polygon fill="#FFFFFF" points="530.2,202.9 532.2,204.6 531.2,203.2 540.8,205.6 530.2,202.4 	"/>
	<g id="leftArm">
		<path fill="#FFDCB8" d="M593.3,231c-0.8-2.4-6.3-1.5-6.3-1.5l-7.9,18.1c-1.3-0.9-2.6-1.7-4-2.1c0,0-4.7-3.6-6.7,1.4
			c0.2,3.1,2,4.2,2,4.2s-7.8,6.1-6.4,8.1c1.4,2,5,2.5,5,2.5s-0.9,3,1.5,3.9c2.3,0.9,3.6,1.1,3.6,1.1s0.9,3,3.4,1.2
			c2.5-1.8,8.9-8.6,8.8-11.2c0-0.7-0.5-1.7-1.2-2.8C587,251.7,594,233.1,593.3,231z"/>
		<path fill="#FFFFFF" d="M541.5,194.9c0,0,18.7-13.7,41,4.3c24.4,19.7,11.4,33.6,11.4,33.6s-1.6-2.5-7-2.6c0,0,7.1-1.5-6.1-20.6
			c-8.6-12.4-24.1-11.2-28.8-7.6C547.3,205.5,543.1,197.5,541.5,194.9"/>
		<polygon fill="#F1F2F2" points="584.1,232.8 594.6,236 599.2,225.6 587.3,224.4 		"/>
		<polygon fill="#594A42" points="581.5,241.1 590.3,244.6 588.7,248.7 579.9,244.7 		"/>
		<path fill="#F1F2F2" d="M588,245.2c-0.4,1.9-2.2,3.2-4.1,2.8c-1.9-0.4-3.2-2.2-2.8-4.1c0.4-1.9,2.2-3.2,4.1-2.8c0.1,0,0.1,0,0.2,0
			C587.2,241.6,588.3,243.3,588,245.2z"/>
		<path fill="#D1D3D4" d="M582,243.1c-0.4,0.7-0.3,3.5,0.4,4c0.1,0.1-0.8-0.2-1-1.1c-0.2-0.9-0.9-1.3,0.3-3.6s3.6-1.4,3.6-1.4
			S583.1,241.2,582,243.1z"/>
		<path fill="#939598" d="M587.2,245.4c-0.1,1-1.7,2.3-3.5,2.1c-0.5-0.1-2.1-1-2.1-1s1.6,1.9,3.4,1.6c1.7-0.4,4-1.7,2.8-5.1
			c-0.7-2-3.2-2.1-3.2-2.1c0,0,1.3,0.4,1.9,1C587,242.6,587.4,243.6,587.2,245.4z"/>
	</g>
</g>
</svg>
</div>
  <div id='bg'>
</div>


              
            
!

CSS

              
                body,html{
  background:#99D5E2;
  margin:0;
  padding:0;
}

div#container{
  width:100%; 
  height:100%;
  background:#99D5E2;
  position: fixed;
}
div#bg{
  position:absolute;
  display:block;
  width:100%;
  height:1000px;
  background:transparent;
}

#tie path:nth-child(2),
#neckHair path:nth-child(2),
#foreHeadHair path:nth-child(2){visibility:hidden}

div#container:before{
  position:relative;
  width:100%;
  display:block;
  color:white;
  font-family:arial,san-serif;
  font-size:.75em;
  padding:10px;
  content:'SCROLL UP AND DOWN'
}
   
              
            
!

JS

              
                var sky = $(document).width();

TweenMax.fromTo(['#clouds path:nth-child(2)','#clouds path:nth-child(1)'],20,{x:-500},{x:sky+50,repeat:-1,ease:Linear.easeInOut})

var blink = new TimelineMax({repeat:-1,repeatDelay:2})
blink.to('#eyes',.25,{scaleY:.25,transformOrigin:'50% 50%'})
.to('#eyes',.25,{scaleY:1,transformOrigin:'50% 50%'})

var tieFlap = new TweenMax.to("#tie path:nth-child(1)", .5, {
  morphSVG:"#tie path:nth-child(2)", 
  ease:Linear.easeOut,
  onComplete:function(){tieFlap.reverse()},
  onReverseComplete:function(){tieFlap.play()}
});

var hairFlap1 = new TweenMax.to("#foreHeadHair path:nth-child(1)", .5, {
  morphSVG:"#foreHeadHair path:nth-child(2)", 
  ease:Linear.easeOut,
  onComplete:function(){hairFlap1.reverse()},
  onReverseComplete:function(){hairFlap1.play()}
});

var hairFlap2 = new TweenMax.to("#neckHair path:nth-child(1)", .5, {
  morphSVG:"#neckHair path:nth-child(2)", 
  ease:Linear.easeOut,
  onComplete:function(){hairFlap2.reverse()},
  onReverseComplete:function(){hairFlap2.play()}
});

var rocket = new TweenMax.to("#flame", .2, {
  scale:1.1,
  transformOrigin:'0% 60%',
  ease:Power2.easeInOut,
  onComplete:function(){rocket.reverse()},
  onReverseComplete:function(){rocket.play()}
});

$(window).scroll(function(e){
		var scrollTop = $(window).scrollTop();
		var docHeight = $(document).height();
		var winHeight = $(window).height();
		var scrollPercent = (scrollTop) / (docHeight - winHeight);
		var scrollPercentRounded = Math.round(scrollPercent*5)/100;

		fly.progress( scrollPercent ).pause();
	});

	function timelineIsUpdating() {
		console.log('timelineIsUpdating()');
	}


var fly = new TweenMax.to('#guy',5, {scale:.5,bezier:{curviness:1, values:[{x:-100, y:-50},{x:-220, y:100},{x:-400, y:-10}]},paused:true, onUpdate:timelineIsUpdating})


              
            
!
999px

Console