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 class="svg-container">
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 1240 881" style="enable-background:new 0 0 1240 881;" xml:space="preserve">
<style type="text/css">
	.st0{fill:url(#saumon_triangle_1_);}
	.st1{fill:url(#pink_triangle_1_);}
	.st2{fill:#5F2952;}
	.st3{fill:#F9F8D2;}
	.st4{fill:#F9D900;}
	.st5{fill:url(#green_big_1_);}
	.st6{fill:#E42517;}
	.st7{fill:#FF655F;}
	.st8{fill:#541933;}
	.st9{fill:#FD615C;}
	.st10{fill:#5D2750;}
	.st11{fill:#FC625C;}
	.st12{fill:#622C55;}
	.st13{fill:url(#yellow_demi_wheel_1_);}
	.st14{fill:url(#dark_yellow_demi_wheel_1_);}
	.st15{opacity:0.68;fill:#9BFBE7;}
	.st16{fill:#078289;}
	.st17{fill:#00D9B7;}
	.st18{fill:#FEE990;}
</style>
<linearGradient id="saumon_triangle_1_" gradientUnits="userSpaceOnUse" x1="488" y1="411.5" x2="851.3333" y2="411.5">
	<stop  offset="0" style="stop-color:#F96762"/>
	<stop  offset="1" style="stop-color:#FF9E9C"/>
</linearGradient>
	<linearGradient id="pink_triangle_1_" gradientUnits="userSpaceOnUse" x1="476" y1="-1.023636e-08" x2="476" y2="330.3333">
	<stop  offset="0" style="stop-color:#F8D4BD"/>
	<stop  offset="1" style="stop-color:#FF9E9C"/>
</linearGradient>
<polygon id="pink_triangle" class="st1" points="248,0 704,0 530.7,330.3 "/>
	<polygon id="purple_rectangle" class="st2" points="852,280.3 556,281 703.7,0 1000,0 "/>
	<polygon id="pale_yellow_rectangle" class="st3" points="851.7,281 765,281 789.7,231.7 877,231.7 "/>
<polygon id="yellow_top" class="st4" points="780,251 789.7,231 877,231 867.7,250.3 "/>
<linearGradient id="green_big_1_" gradientUnits="userSpaceOnUse" x1="1046.3334" y1="543.6667" x2="1046.3334" y2="-8.740244e-09">
	<stop  offset="0" style="stop-color:#00D5B3"/>
	<stop  offset="1" style="stop-color:#8EF1CA"/>
</linearGradient>
<polygon id="green_big" class="st5" points="1241,0 998.3,0 851.7,280.3 991,543.7 1241,543.7 "/>
<polygon id="pale_pink" class="st7" points="529,281 555,281 499,388.5 478,377 "/>
<polygon id="purple_coude" class="st8" points="446,232 553.5,232.5 528.5,281 507.5,281 523.5,249 462,250 "/>
<polygon id="orange_line" class="st9" points="1241.7,687.7 1241.7,715 417,715 469.7,687.7 "/>
<path id="purple_circle" class="st10" d="M771,544.2c-0.7,31.8-26.7,57.4-58.6,57.4c-32.4,0-58.7-26.3-58.7-58.7
	c0-17.5,8.2-34.1,20.3-44.9l38,46h1L771,544.2z"/>

<path id="purple_wheel" class="st12" d="M990,362c-98.3,0-178,79.7-178,178s79.7,178,178,178s178-79.7,178-178S1088.3,362,990,362z
	 M990,677c-75.7,0-137-61.3-137-137s61.3-137,137-137s137,61.3,137,137S1065.7,677,990,677z"/>
	<polygon id="mint_triangle" class="st15" points="712,544.3 852,281 992,544.3 "/>
<polygon id="saumon_triangle" class="st0" points="712,543 851.3,281 488,280 "/>
<linearGradient id="yellow_demi_wheel_1_" gradientUnits="userSpaceOnUse" x1="250.3516" y1="652.4041" x2="427.3823" y2="345.778">
	<stop  offset="0" style="stop-color:#FFE882"/>
	<stop  offset="1" style="stop-color:#FBFACB"/>
</linearGradient>
<path id="yellow_demi_wheel" class="st13" d="M499.2,387.3L335,700.3c-61.3-27.8-104-89.6-104-161.3c0-97.8,79.2-177,177-177
	C441.4,362,472.6,371.2,499.2,387.3z"/>
<linearGradient id="dark_yellow_demi_wheel_1_" gradientUnits="userSpaceOnUse" x1="410.9219" y1="539.9367" x2="561.5098" y2="626.8787">
	<stop  offset="0" style="stop-color:#F7A300"/>
	<stop  offset="7.545835e-02" style="stop-color:#FAB503"/>
	<stop  offset="0.18" style="stop-color:#FCC605"/>
	<stop  offset="0.3102" style="stop-color:#FED107"/>
	<stop  offset="0.4929" style="stop-color:#FFD808"/>
	<stop  offset="1" style="stop-color:#FFDA08"/>
</linearGradient>
<path id="dark_yellow_demi_wheel" class="st14" d="M585,538.7c0,97.8-79.2,177-177,177c-26,0-50.8-5.6-73-15.7l164.3-313
	C550.6,418,585,474.3,585,538.7z"/>
<path id="green_blue_demi_circle" class="st16" d="M1127,542c0,1,0,2,0,2.9L988,545l-62-126c19.5-10.8,40.2-16,64-16
	C1065.7,403,1127,465.2,1127,542z"/>
<path id="green_demi_circle" class="st17" d="M771,542.2c0,0.4,0,0.9,0,1.3l-58.6,0.4l28.2-53.2h0c9.3,5.1,17,12.7,22.4,21.8v0
	l3.6,7.3v0C769.4,526.8,771,534.3,771,542.2z"/>
	<path id="saumon_demi_circle" class="st11" d="M740.9,490.7L712.4,544L674,498.4c0.1-0.1,0.3-0.2,0.4-0.4
	c10.3-9,23.8-14.4,38.5-14.4C723.1,483.6,732.6,486.1,740.9,490.7z"/>
	<polygon id="red_rectangle" class="st6" points="555,281 593.5,281 556,360.5 530,330.5 "/>
<rect y="715" class="st18" width="1240" height="166"/>
</svg>
</div>
              
            
!

CSS

              
                move = all 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940)

body
	background #FFFED7
	overflow: hidden
	
.svg-container
	height 500px
	width 500px
	position absolute
	top 50%
	left 50%
	transform translate(-50%, -50%)
	overflow hidden
	cursor pointer
	
svg 
	height 100%
	width 100%
	margin 0 auto
	display block
	overflow hidden
	
	*
		transform-origin top
		transition move
	#green_blue_demi_circle
		transform-origin 31% 97%
	
.animated
	*
		transition move
	#mint_triangle
		transform rotate(56deg)
		
	#red_rectangle
		transform scale(0) translateX(-100%)
		
	#pale_pink
		transform translateX(120%)
		
	#pale_yellow_rectangle
		transform translate(-30px, 50px)
		
	#yellow_top
		transform translate(-30px, 50px)
	
	#pink_triangle
		transform translateX(250%)
	
	#purple_rectangle
		transform translateX(160%)
		
	#green_big
		transform translateX(100%)
		
	rect
		transform translateX(-100%)
		
	#purple_coude
		transform translate(50px, 50px)
		
	#orange_line
		transform translateX(100%)
	
	#dark_yellow_demi_wheel, #yellow_demi_wheel
		transform translateX(86%) rotate(62deg)
		
	#purple_wheel, #green_blue_demi_circle
		transform translateX(-80%) rotate(242deg)
		
	#green_demi_circle, #saumon_demi_circle
		transform translate(-330%, -30%)
	
	#purple_circle
		transform translate(57%, 55%) rotate(246deg)
		
		
		
	

              
            
!

JS

              
                document.querySelector('svg').addEventListener('click', function(){
	document.querySelector('svg').classList.toggle('animated')
})
              
            
!
999px

Console