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

              
                <?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
	 viewBox="0 0 2500 512"  xml:space="preserve">
<style type="text/css">
	.st0{fill:none;}
	.st1{fill:#232F33;}
	.st2{opacity:0.94;fill:url(#SVGID_1_);}
	.st3{opacity:0.1;fill:url(#SVGID_2_);}
	.st4{fill:url(#shadow4_1_);}
	.st5{fill:url(#shadow3_1_);}
	.st6{fill:url(#shadow2_1_);}
	.st7{fill:url(#shadow1_1_);}
	.st8{fill:url(#_x34_-droite_1_);}
	.st9{fill:url(#_x34_-gauche_1_);}
	.st10{fill:url(#light_9_);}
	.st11{fill:none;stroke:#FFFFFF;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
	.st12{fill:url(#light_10_);}
	.st13{fill:url(#light_11_);}
	.st14{fill:url(#light_12_);}
	.st15{fill:url(#light_13_);}
	.st16{fill:url(#light_14_);}
	.st17{fill:url(#light_15_);}
	.st18{fill:url(#light_16_);}
	.st19{fill:url(#lumiere-ampoule_1_);}
	.st20{fill:url(#ampoule-verte_1_);}
</style>
  
  <defs>
    
    <animate 
    xlink:href="#lumiere-ampoule_1_"
    attributeName="r"
    values="94.8943; 50; 94.8943"
    keyTimes="0; 0.5; 1"
    dur="4s"
    begin="0"
    repeatCount="indefinite"
     />
    
  <animate 
  xlink:href="#light_9_"
  attributeName="r"
  values="21.9627; 10; 21.9627"
  keyTimes="0; 0.5; 1"
  dur="4s"
  begin="0"
  repeatCount="indefinite"
   />
  
  <animate 
  xlink:href="#light_10_"
  attributeName="r"
  values="21.9627; 10; 21.9627"
  keyTimes="0; 0.5; 1"
  dur="4s"
  begin="2s"
  repeatCount="indefinite"
   />
    
  <animate 
  xlink:href="#light_11_"
  attributeName="r"
  values="21.9627; 10; 21.9627"
  keyTimes="0; 0.5; 1"
  dur="4s"
  begin="0"
  repeatCount="indefinite"
   />
    
  <animate 
  xlink:href="#light_12_"
  attributeName="r"
  values="21.9627; 10; 21.9627"
  keyTimes="0; 0.5; 1"
  dur="4s"
  begin="2s"
  repeatCount="indefinite"
   />
    
  <animate 
  xlink:href="#light_13_"
  attributeName="r"
  values="21.9627; 10; 21.9627"
  keyTimes="0; 0.5; 1"
  dur="4s"
  begin="0"
  repeatCount="indefinite"
   />
    
  <animate 
  xlink:href="#light_14_"
  attributeName="r"
  values="21.9627; 10; 21.9627"
  keyTimes="0; 0.5; 1"
  dur="4s"
  begin="2s"
  repeatCount="indefinite"
   />
    
  <animate 
  xlink:href="#light_15_"
  attributeName="r"
  values="21.9627; 10; 21.9627"
  keyTimes="0; 0.5; 1"
  dur="4s"
  begin="0"
  repeatCount="indefinite"
   />
    
    
  <animate 
  xlink:href="#light_16_"
  attributeName="r"
  values="21.9627; 10; 21.9627"
  keyTimes="0; 0.5; 1"
  dur="4s"
  begin="2s"
  repeatCount="indefinite"
   />
    
  </defs>
<pattern  x="1659.5" y="-6336.9" width="8.1" height="8.1" patternUnits="userSpaceOnUse" id="Nouvelle_nuance_de_motif_2" viewBox="0 -8.1 8.1 8.1" style="overflow:visible;">
	<g>
		<rect y="-8.1" class="st0" width="8.1" height="8.1"/>
		<path class="st1" d="M1.2-1.2h1.9v-1.9H1.2V-1.2z M5-5H7V-7H5V-5z"/>
	</g>
</pattern>
  
  
<g id="fond">
	<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="1250" y1="119.3104" x2="1250" y2="572.1934">
		<stop  offset="3.953515e-04" style="stop-color:#577380"/>
		<stop  offset="0.7758" style="stop-color:#3A4D55"/>
	</linearGradient>
	<rect y="0" class="st2" width="2500" height="512"/>
	
		<pattern  id="SVGID_2_" xlink:href="#Nouvelle_nuance_de_motif_2" patternTransform="matrix(2.0833 0 0 0.8107 11372.666 808.6779)">
	</pattern>
	<rect y="0" class="st3" width="2500" height="512"/>
</g>
<g id="shadows">
	
		<radialGradient id="shadow4_1_" cx="1394.3293" cy="-214.9522" r="224.07" gradientTransform="matrix(-0.5762 0.8173 -0.2057 -0.145 2300.1111 -910.7302)" gradientUnits="userSpaceOnUse">
		<stop  offset="0" style="stop-color:#000000"/>
		<stop  offset="9.160227e-02" style="stop-color:#000000;stop-opacity:0.8769"/>
		<stop  offset="0.7444" style="stop-color:#000000;stop-opacity:0"/>
	</radialGradient>
	<path id="shadow4" class="st4" d="M1424.7,436.5c30.3,18.7,103.1-34.8,163.8-120.9c60.7-86.1,86.7-172.6,58.9-194.9L1424.7,436.5z"
		/>
	
		<radialGradient id="shadow3_1_" cx="1549.0125" cy="-372.5109" r="224.07" gradientTransform="matrix(0.5762 -0.8173 0.2057 0.145 529.8186 1611.9675)" gradientUnits="userSpaceOnUse">
		<stop  offset="0" style="stop-color:#000000"/>
		<stop  offset="9.160227e-02" style="stop-color:#000000;stop-opacity:0.8769"/>
		<stop  offset="0.7444" style="stop-color:#000000;stop-opacity:0"/>
	</radialGradient>
	<path id="shadow3" class="st5" d="M1461.9,115.4c-30.3-18.7-103.1,34.8-163.8,120.9c-60.7,86.1-86.7,172.6-58.9,194.9L1461.9,115.4
		z"/>
	
		<radialGradient id="shadow2_1_" cx="1696.2003" cy="-436.7093" r="224.07" gradientTransform="matrix(-0.5762 0.8173 -0.2057 -0.145 2053.9556 -1182.3118)" gradientUnits="userSpaceOnUse">
		<stop  offset="0" style="stop-color:#000000"/>
		<stop  offset="9.160227e-02" style="stop-color:#000000;stop-opacity:0.8769"/>
		<stop  offset="0.7444" style="stop-color:#000000;stop-opacity:0"/>
	</radialGradient>
	<path id="shadow2" class="st6" d="M1050.2,443.8c30.3,18.7,103.1-34.8,163.8-120.9c60.7-86.1,86.7-172.6,58.9-194.9L1050.2,443.8z"
		/>
	
		<radialGradient id="shadow1_1_" cx="952.2841" cy="126.1413" r="224.07" gradientTransform="matrix(0.5762 -0.8173 0.2057 0.145 399.4058 1036.9795)" gradientUnits="userSpaceOnUse">
		<stop  offset="0" style="stop-color:#000000"/>
		<stop  offset="9.160227e-02" style="stop-color:#000000;stop-opacity:0.8769"/>
		<stop  offset="0.7444" style="stop-color:#000000;stop-opacity:0"/>
	</radialGradient>
	<path id="shadow1" class="st7" d="M1090.2,100.5c-30.3-18.7-103.1,34.8-163.8,120.9c-60.7,86.1-86.7,172.6-58.9,194.9L1090.2,100.5
		z"/>
</g>
<g id="_x34_04">
	<linearGradient id="_x34_-droite_1_" gradientUnits="userSpaceOnUse" x1="1424.7272" y1="288.3243" x2="1424.7272" y2="342.9909">
		<stop  offset="0" style="stop-color:#FFFFFF"/>
		<stop  offset="0.1342" style="stop-color:#EAEAEA"/>
		<stop  offset="0.4925" style="stop-color:#B6B6B6"/>
		<stop  offset="0.7628" style="stop-color:#969696"/>
		<stop  offset="0.9119" style="stop-color:#8A8A8A"/>
	</linearGradient>
	<path id="_x34_-droite" class="st8" d="M1371.7,305.1v-28.7l54.3-77.5h38.1V275h13.6v30.1h-13.6v21.2h-35v-21.2H1371.7z
		 M1431.7,238l-24.4,37h24.4V238z"/>
	<linearGradient id="_x34_-gauche_1_" gradientUnits="userSpaceOnUse" x1="1077.2139" y1="288.3243" x2="1077.2139" y2="342.9909">
		<stop  offset="0" style="stop-color:#FFFFFF"/>
		<stop  offset="0.1342" style="stop-color:#EAEAEA"/>
		<stop  offset="0.4925" style="stop-color:#B6B6B6"/>
		<stop  offset="0.7628" style="stop-color:#969696"/>
		<stop  offset="0.9119" style="stop-color:#8A8A8A"/>
	</linearGradient>
	<path id="_x34_-gauche" class="st9" d="M1024.2,305.1v-28.7l54.3-77.5h38.1V275h13.6v30.1h-13.6v21.2h-35v-21.2H1024.2z
		 M1084.2,238l-24.4,37h24.4V238z"/>
</g>

  
  <g id="ampoule">
	<g>
		<g id="lumières">
			<g id="light8">
				
					<radialGradient id="light_9_" cx="1190.9298" cy="201.4154" r="21.9627" gradientTransform="matrix(0.6402 0.7682 -0.3661 0.3051 502.2501 -774.928)" gradientUnits="userSpaceOnUse">
					<stop  offset="0" style="stop-color:#FFFFFF"/>
					<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
             
        
				</radialGradient>
				<path id="light_7_" class="st10" d="M1207.6,205.9l-17.7-21.1c-1.6-1.9-3.9-3.1-6.4-3.4c-2.5-0.2-5,0.6-6.9,2.2
					c-1.9,1.6-3.1,3.9-3.4,6.5c-0.2,2.5,0.6,5,2.2,6.9l17.7,21.1c1.8,2.2,4.5,3.4,7.3,3.4c2.2,0,4.4-0.8,6.1-2.2
					c1.9-1.6,3.1-3.9,3.4-6.5C1210,210.3,1209.2,207.8,1207.6,205.9z"/>
				<line class="st11" x1="1200.3" y1="212" x2="1182.6" y2="190.9"/>
			</g>
			<g id="light7">
				
					<radialGradient id="light_10_" cx="1238.8645" cy="170.3924" r="21.9627" gradientTransform="matrix(-4.084313e-03 1 -0.4765 -1.946316e-03 1334.8523 -1053.9171)" gradientUnits="userSpaceOnUse">
					<stop  offset="0" style="stop-color:#FFFFFF"/>
					<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
				</radialGradient>
				<path id="light_8_" class="st12" d="M1258.5,198.7l0-27.6c0-2.5-1-4.9-2.8-6.7c-1.8-1.8-4.2-2.8-6.7-2.8c-2.5,0-4.9,1-6.7,2.8
					c-1.8,1.8-2.8,4.2-2.8,6.7l0,27.6c0,2.8,1.2,5.5,3.4,7.3c1.7,1.4,3.9,2.2,6.1,2.2c2.5,0,4.9-1,6.7-2.8
					C1257.5,203.7,1258.5,201.3,1258.5,198.7z"/>
				<line class="st11" x1="1249" y1="198.7" x2="1249" y2="171.2"/>
			</g>
			<g id="light6">
				
					<radialGradient id="light_11_" cx="1197.6992" cy="185.0727" r="21.9627" gradientTransform="matrix(0.9959 9.053575e-02 -4.314340e-02 0.4746 -22.0398 64.8683)" gradientUnits="userSpaceOnUse">
					<stop  offset="0" style="stop-color:#FFFFFF"/>
					<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
				</radialGradient>
				<path id="light_6_" class="st13" d="M1177.7,252.5l-27.4-2.4c-2.5-0.2-5,0.6-6.9,2.2c-1.9,1.6-3.1,3.9-3.4,6.4
					c-0.2,2.5,0.6,5,2.2,6.9c1.6,1.9,3.9,3.1,6.5,3.4l27.5,2.4c2.8,0.2,5.6-0.8,7.5-2.7c1.6-1.6,2.6-3.7,2.7-5.9
					c0.2-2.5-0.6-5-2.2-6.9C1182.5,253.9,1180.2,252.7,1177.7,252.5z"/>
				<line class="st11" x1="1176.9" y1="262" x2="1149.4" y2="259.6"/>
			</g>
			<g id="light5">
				
					<radialGradient id="light_12_" cx="1214.042" cy="178.3033" r="21.9627" gradientTransform="matrix(0.7682 -0.6402 0.3051 0.3661 198.0138 1035.2203)" gradientUnits="userSpaceOnUse">
					<stop  offset="0" style="stop-color:#FFFFFF"/>
					<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
				</radialGradient>
				<path id="light_5_" class="st14" d="M1189.5,306.6l-21.1,17.7c-1.9,1.6-3.1,3.9-3.4,6.4c-0.2,2.5,0.6,5,2.2,6.9
					c1.6,1.9,3.9,3.1,6.5,3.4c2.5,0.2,5-0.6,6.9-2.2l21.1-17.7c2.2-1.8,3.4-4.5,3.4-7.3c0-2.2-0.8-4.4-2.2-6.1
					c-1.6-1.9-3.9-3.1-6.5-3.4C1193.9,304.2,1191.5,305,1189.5,306.6z"/>
				<line class="st11" x1="1195.6" y1="313.9" x2="1174.5" y2="331.6"/>
			</g>
			<g id="light4">
				
					<radialGradient id="light_13_" cx="1230.3848" cy="185.0727" r="21.9627" gradientTransform="matrix(9.053575e-02 -0.9959 0.4746 4.314340e-02 1045.5553 1568.8046)" gradientUnits="userSpaceOnUse">
					<stop  offset="0" style="stop-color:#FFFFFF"/>
					<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
				</radialGradient>
				<path id="light_4_" class="st15" d="M1236.1,336.5l-2.4,27.4c-0.2,2.5,0.6,5,2.2,6.9c1.6,1.9,3.9,3.1,6.4,3.4
					c2.5,0.2,5-0.6,6.9-2.2c1.9-1.6,3.1-3.9,3.4-6.5l2.4-27.5c0.2-2.8-0.8-5.6-2.7-7.5c-1.6-1.6-3.7-2.6-5.9-2.7
					c-2.5-0.2-5,0.6-6.9,2.2C1237.6,331.7,1236.4,334,1236.1,336.5z"/>
				<line class="st11" x1="1245.6" y1="337.4" x2="1243.2" y2="364.8"/>
			</g>
			<g id="light3">
				
					<radialGradient id="light_14_" cx="1237.1542" cy="201.4154" r="21.9627" gradientTransform="matrix(-0.6402 -0.7682 0.3661 -0.3051 2025.2017 1341.0057)" gradientUnits="userSpaceOnUse">
					<stop  offset="0" style="stop-color:#FFFFFF"/>
					<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
				</radialGradient>
				<path id="light_3_" class="st16" d="M1290.3,324.7l17.7,21.1c1.6,1.9,3.9,3.1,6.4,3.4c2.5,0.2,5-0.6,6.9-2.2
					c1.9-1.6,3.1-3.9,3.4-6.5c0.2-2.5-0.6-5-2.2-6.9l-17.7-21.1c-1.8-2.2-4.5-3.4-7.3-3.4c-2.2,0-4.4,0.8-6.1,2.2
					c-1.9,1.6-3.1,3.9-3.4,6.5C1287.9,320.3,1288.6,322.8,1290.3,324.7z"/>
				<line class="st11" x1="1297.5" y1="318.6" x2="1315.3" y2="339.7"/>
			</g>
			<g id="light2">
				
					<radialGradient id="light_15_" cx="1230.3848" cy="217.7582" r="21.9627" gradientTransform="matrix(-0.9959 -9.053575e-02 4.314340e-02 -0.4746 2551.0408 484.1699)" gradientUnits="userSpaceOnUse">
					<stop  offset="0" style="stop-color:#FFFFFF"/>
					<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
				</radialGradient>
				<path id="light_2_" class="st17" d="M1320.2,278.1l27.4,2.4c2.5,0.2,5-0.6,6.9-2.2c1.9-1.6,3.1-3.9,3.4-6.4
					c0.2-2.5-0.6-5-2.2-6.9c-1.6-1.9-3.9-3.1-6.5-3.4l-27.5-2.4c-2.8-0.2-5.6,0.8-7.5,2.7c-1.6,1.6-2.6,3.7-2.7,5.9
					c-0.2,2.5,0.6,5,2.2,6.9C1315.4,276.7,1317.6,277.9,1320.2,278.1z"/>
				<line class="st11" x1="1321" y1="268.6" x2="1348.5" y2="271"/>
			</g>
			<g id="light1">
				
					<radialGradient id="light_16_" cx="1214.042" cy="224.5276" r="21.9627" gradientTransform="matrix(-0.7682 0.6402 -0.3051 -0.3661 2313.9475 -487.7312)" gradientUnits="userSpaceOnUse">
					<stop  offset="0" style="stop-color:#FFFFFF"/>
					<stop  offset="1" style="stop-color:#FFFFFF;stop-opacity:0"/>
				</radialGradient>
				<path id="light_1_" class="st18" d="M1308.3,224l21.1-17.7c1.9-1.6,3.1-3.9,3.4-6.4c0.2-2.5-0.6-5-2.2-6.9
					c-1.6-1.9-3.9-3.1-6.5-3.4c-2.5-0.2-5,0.6-6.9,2.2l-21.1,17.7c-2.2,1.8-3.4,4.5-3.4,7.3c0,2.2,0.8,4.4,2.2,6.1
					c1.6,1.9,3.9,3.1,6.5,3.4C1303.9,226.4,1306.4,225.6,1308.3,224z"/>
				<line class="st11" x1="1302.2" y1="216.7" x2="1323.4" y2="199"/>
			</g>
		</g>
		<radialGradient id="lumiere-ampoule_1_" cx="1252.2445" cy="261.5765" r="94.8943" gradientUnits="userSpaceOnUse">
			<stop  offset="1.936983e-03" style="stop-color:#8EBE21"/>
			<stop  offset="3.414698e-02" style="stop-color:#97C224;stop-opacity:0.9676"/>
			<stop  offset="0.1396" style="stop-color:#AECB2D;stop-opacity:0.8614"/>
			<stop  offset="0.2603" style="stop-color:#C1D234;stop-opacity:0.7398"/>
			<stop  offset="0.4036" style="stop-color:#CDD738;stop-opacity:0.5955"/>
			<stop  offset="0.5915" style="stop-color:#D5DA3B;stop-opacity:0.4062"/>
			<stop  offset="0.9948" style="stop-color:#D7DB3C;stop-opacity:0"/>
      
        

		</radialGradient>
		<path id="lumiere-ampoule" class="st19" d="M1315.7,194.9c-9.6-9.2-16.4-19.8-20-30.3h-1.8h-8.1h-67.2h-8.1h-1.7
			c-3.4,10.5-10.5,21-20.1,30.3c-21.3,20.9-32,49.6-28.7,79.3c4.6,44,39.9,79.3,83.4,83.9c2.8,0,5.6,0.5,8.8,0.5s6-0.5,8.8-0.5
			c43.6-5.1,78.8-40.3,83.4-83.9C1347.7,244.5,1337.1,215.3,1315.7,194.9z"/>
		<radialGradient id="ampoule-verte_1_" cx="1250.5966" cy="262.308" r="52.4844" gradientUnits="userSpaceOnUse">
			<stop  offset="5.237392e-03" style="stop-color:#D7DB3C"/>
			<stop  offset="0.2126" style="stop-color:#D2D93A"/>
			<stop  offset="0.4737" style="stop-color:#C2D334"/>
			<stop  offset="0.7623" style="stop-color:#A8C92B"/>
			<stop  offset="0.9981" style="stop-color:#8EBE21"/>
		</radialGradient>
		<path id="ampoule-verte" class="st20" d="M1285.7,225.4c-5.3-5.1-9.1-10.9-11-16.7h-1h-4.5H1232h-4.5h-0.9
			c-1.9,5.8-5.8,11.6-11.1,16.7c-11.8,11.5-17.7,27.4-15.9,43.8c2.6,24.4,22,43.8,46.1,46.4c1.5,0,3.1,0.3,4.9,0.3
			c1.8,0,3.3-0.3,4.9-0.3c24.1-2.8,43.6-22.3,46.1-46.4C1303.4,252.9,1297.5,236.7,1285.7,225.4z"/>
		<path d="M1273.9,169.8c0-1.5-1-2.6-2.6-2.6h-3.8l-4.6-6.2c-2.1-2.6-4.9-4.1-8.2-4.1h-1.3V0h-6.3v157c-3.3,0-6.4,1.5-8.2,4.1
			l-4.6,6.2h-3.8c-1.5,0-2.6,1-2.6,2.6V199c-0.2,0.9-0.4,1.8-0.7,2.7h47.5c-0.3-0.9-0.5-1.8-0.7-2.7V169.8z M1269.9,196
			c0,0.6-0.4,1-1,1s-1-0.4-1-1v-22c0-0.6,0.4-1,1-1s1,0.4,1,1V196z"/>
	</g>
</g>
</svg>

              
            
!

CSS

              
                #ampoule {
  -webkit-animation: balance 2s 3s ease-in-out infinite alternate, descente 3s ease-out;
          animation: balance 2s 3s ease-in-out infinite alternate, descente 3s ease-out;
}

@-webkit-keyframes descente {
  0%  {
    -webkit-transform: translateY(-150px) rotate(0deg);
            transform: translateY(-150px) rotate(0deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  
   40%  {
    -webkit-transform: translateY(-30px) rotate(20deg);
            transform: translateY(-30px) rotate(20deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  
    70% {
    -webkit-transform: translateY(-10px) rotate(-20deg);
            transform: translateY(-10px) rotate(-20deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
     90% {
    -webkit-transform: translateY(0px) rotate(10deg);
            transform: translateY(0px) rotate(10deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  100% {
    -webkit-transform: translateY(0px) rotate(0deg);
            transform: translateY(0px) rotate(0deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
}

@keyframes descente {
  0%  {
    -webkit-transform: translateY(-150px) rotate(0deg);
            transform: translateY(-150px) rotate(0deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  
   40%  {
    -webkit-transform: translateY(-30px) rotate(20deg);
            transform: translateY(-30px) rotate(20deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  
    70% {
    -webkit-transform: translateY(-10px) rotate(-20deg);
            transform: translateY(-10px) rotate(-20deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
     90% {
    -webkit-transform: translateY(0px) rotate(10deg);
            transform: translateY(0px) rotate(10deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  100% {
    -webkit-transform: translateY(0px) rotate(0deg);
            transform: translateY(0px) rotate(0deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
}

@-webkit-keyframes balance {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }

    50% {
    -webkit-transform: rotate(5deg);
            transform: rotate(5deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  
100% {
    -webkit-transform: rotate(-5deg);
            transform: rotate(-5deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  
}

@keyframes balance {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }

    50% {
    -webkit-transform: rotate(5deg);
            transform: rotate(5deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  
100% {
    -webkit-transform: rotate(-5deg);
            transform: rotate(-5deg);
    -webkit-transform-origin: top center;
            transform-origin: top center;
  }
  
}
              
            
!

JS

              
                
              
            
!
999px

Console