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

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

              
                <svg class="snow-peng" viewBox="0 0 1000 700">
  <g class="peng">
		<g class="peng-boing" style="transform-origin:131px 425px">
			<g class="peng-slide">
				<g class="peng-flip">
					<g class="peng-body" style="transform-origin:131px 171px">
						<rect class="peng-foot peng-3" x="71.208" y="399" width="55" height="25" rx="12" style="transform-origin:125px 412px"/>
						<path class="peng-1" d="M140 122h20a140 140 0 01140 140v25a125 125 0 01-125 125h-50A125 125 0 010 287v-25a140 140 0 01140-140z"/>
						<ellipse class="peng-2" cx="99.208" cy="271" rx="89" ry="112"/>
						<path class="peng-arm peng-4" d="M241.555 295.333l19.548-59.76a6.54 6.54 0 00-6.216-8.573h-51.96a6.54 6.54 0 00-6.215 8.573l19.547 59.76c4 12.227 21.297 12.227 25.296 0z" style="transform-origin:224px 219px"/>
						<rect class="peng-foot peng-5" x="152.208" y="400" width="55" height="25" rx="12" style="transform-origin:207px 412px"/>
					</g>
					<g class="peng-head" style="transform-origin:159px 170px">
						<path class="peng-1" d="M147.222 0h5.556A122.222 122.222 0 01275 122.222 97.778 97.778 0 01177.222 220h-54.444A97.778 97.778 0 0125 122.222 122.222 122.222 0 01147.222 0z"/>
						<path class="peng-2" d="M126.201 38.279l-19.185 67.298a5.595 5.595 0 01-10.615 0L79.425 46.03C47.982 59.605 26.208 88.964 26.208 123c0 46.944 41.414 85 92.5 85s92.5-38.056 92.5-85c0-44.626-37.425-81.216-85.007-84.721z"/>
						<ellipse class="peng-6" cx="38.208" cy="123" rx="12" ry="8"/>
						<ellipse class="peng-6" cx="168.208" cy="123" rx="14" ry="8"/>
						<ellipse class="peng-7" cx="158.708" cy="107.5" rx="9.5" ry="13.5"/>
						<ellipse class="peng-7" cx="46.708" cy="107.5" rx="9.5" ry="13.5"/>
						<rect class="peng-3" x="84.208" y="109" width="31" height="25" rx="12"/>
						<rect class="peng-5" x="67.208" y="103" width="48" height="25" rx="12"/>
					</g>
					<g class="peng-scarf" style="transform-origin:159px 145px">
						<g class="peng-scarf-under" style="transform-origin:257px 210px">
							<rect class="peng-8" x="202.19" y="177.682" width="106" height="70" rx="20" transform="rotate(80 255.19 212.682)"/>
							<path class="peng-8" d="M287.928 246.26l5.21 29.545-3.94.695-5.21-29.545zM272.171 249.039l5.21 29.544-3.94.695-5.209-29.544zM256.414 251.817l5.21 29.545-3.94.694-5.21-29.544zM240.657 254.596l5.21 29.544-3.94.694-5.21-29.544z"/>
						</g>
						<rect class="peng-scarf-main peng-9" y="151.5" width="300" height="70" rx="20" style="transform-origin:300px 190px"/>
					</g>
				</g>
			</g>
		</g>
  </g>
</svg>
              
            
!

CSS

              
                body {
	display: flex;
	align-items: center;
	height: 100vh;
}

$ptl1: 1s;
$ptl1-half: 0.2s; // 1.2s
$ptl2-delay: 1.4s;
$ptl3: 1.1s;
$ptl3-delay: 2.5s;
$ptl4-delay: 2.6s;
$ptl5-delay: 3.4s;

.snow-peng {
	width: 100%;
	animation: floatDown $ptl1 forwards;
	transform-origin: center bottom;
}

.peng {
	animation: sliding 5s $ptl5-delay infinite alternate ease-out;
	
	&-flip {
		animation: flipper 10s $ptl5-delay infinite;
	}
	
	&-boing {
		animation: boing $ptl1-half $ptl1 forwards;
	}
	
	&-slide {
		transform: translateX(350px);
		transform-origin: bottom center;
		animation: slidingLeft $ptl3 $ptl3-delay ease-out forwards;
	}
	
	&-scarf-under {
		animation: windy 0.3s $ptl4-delay infinite;
	}
	
	&-foot {
		animation: footMove 1s $ptl4-delay infinite;
	}
	
	&-arm {
		animation: armMove 2s $ptl4-delay infinite;
	}
	
	&-body {
		animation: toSlidePosBody 1s $ptl2-delay forwards;
	}

	&-head {
		animation: toSlidePosHead 1s $ptl2-delay forwards;
	}

	&-scarf {
		&-main {
			animation: toSlidePosScarfMain 1s $ptl2-delay forwards;
		}

		animation: toSlidePosScarf 1s $ptl2-delay forwards;
	}
}

.peng-1 { fill: #bde7ff; }
.peng-2 { fill: #fff; }
.peng-3 { fill: #db6a1f; }
.peng-4 { fill: #95dbf9; }
.peng-5 { fill: #ff8931; }
.peng-6 { fill: #ff5086; opacity: 0.3; }
.peng-7 { fill: #444; }
.peng-8 { fill: #db4242; }
.peng-9 { fill: #ff5252; }

@keyframes floatDown {
	0% { transform: translateY(-100%) }
	100% { transform: translateY(0) }
}

@keyframes boing {
	0% { transform: scaleY(0.8) }
	40% { transform: scaleY(1.05) }
	70% { transform: scaleY(0.95) }
	100% { transfrom: scaleY(1) }
}

@keyframes slidingLeft {
	0% { transform: translateX(350px) }
	99.9% { transform: translateX(-420px) }
	100% { transform: translateX(0) }
}

@keyframes toSlidePosBody {
	100% { transform: rotate(-80deg) }
}

@keyframes toSlidePosHead {
	100% { transform: rotate(-28deg) }
}

@keyframes toSlidePosScarfMain {
	100% { transform: scaleX(0.95) }
}

@keyframes toSlidePosScarf {
	100% { transform: rotate(-44deg) }
}

@keyframes sliding {
	0% { transform: translateX(-420px); }
	100% { transform: translateX(1420px); }
}

@supports (offset-path: path('M0,100')) {
	@keyframes sliding {
		0%, 100% { offset-path: path('M-520,210S-171.6634,10,141.4481,10,540.6654,158.7677,802.8963,158.7677,1200.1566,54.9183,1480,54.9183') }
		100% { offset-distance: 100%; }
	}
}

@keyframes flipper {
	0%, 49.9% { transform: rotateY(180deg) scale(0.6) }
	50%, 100% { transform: rotateY(0deg) translateY(100px) }
}

@keyframes windy {
	20% { transform: rotate(-10deg) }
	40% { transform: rotate(0deg) }
	60% { transform: rotate(5deg) }
	80% { transform: rotate(-5deg) }
	100% { transform: rotate(0deg) }
}

@keyframes footMove {
	33% { transform: translateY(-20px) rotate(-90deg) }
	66% { transform: translateY(-20px) rotate(-107deg) }
	0%, 100% { transform: translateY(-20px) rotate(-100deg) }
}

@keyframes armMove {
	0%, 100% { transform: translateY(50px) rotate(-70deg) }
	50% { transform: translateY(50px) rotate(-50deg) }
}
              
            
!

JS

              
                
              
            
!
999px

Console