123

Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <a href="https://codepen.io/collection/ArLPGy/" target="_blank">see whole collection</a>
<h1>#31<span>creepy</span>SVGs</h1>		
	
	<svg version="1.1" id="zombie-person" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
		 viewBox="0 0 507 594" style="enable-background:new 0 0 507 594;" xml:space="preserve">
		<style type="text/css">
			.st0{fill:#9D9D36;}
			.st1{fill:#AFB436;}
			.st2{fill:#04897B;}
			.st3{fill:#006A5C;}
			.st4{fill:#FACDD2;}
			.st5{fill:#EF9A9B;}
			.st6{fill:#EF5451;}
			.st7{fill:#F5F5F5;}
			.st8{fill:#212121;}
			.st9{fill:#4E352E;}
			.st10{fill:#E57373;}
			.st11{fill:#FEF5A0;}
		</style>
		<path class="st0" d="M87.2,187.4"/>
		<g>
			<path class="st1" d="M189.8,375.6c4.6-4.5,28-3.6,28-3.6l25.2-0.1v0l0.3,0l0.3,0v0l25.2,0.1c0,0,23.3-0.9,28,3.6
				c4.6,4.4-32.5,25.6-53.5,24.5C222.2,401.2,185.1,380.1,189.8,375.6z"/>
			<path class="st0" d="M213.2,374.7c0,0,28.9,31.8,58.6-0.1C271.8,374.5,241.2,369,213.2,374.7z"/>
			<path class="st2" d="M296.7,375.6c0,0,23.6-3.5,28.3,0c4.7,3.5,53.7,48.8,53.7,48.8s-7.3,1.7-24.3,0c0,0-28-3.3-39,13.7l54,147
				c0,0-0.3,4.3-21-12s-7.3,2-14.7,1.7c-7.3-0.3-21-18-34-15.3c-13,2.7,1.7,13.3-9.3,11.3s-32.6-21.7-44.6-8.3
				c-12,13.3,0,22.4-29.4,23.2s-56.7,2.5-66.7,3.5s24.7-28,22-34c-2.7-6-27.6,1.7-23.8,5c3.8,3.3,9.2,5.3-3.2,11.3
				c-12.3,6-8,17.7-8,17.7s-6.3-0.7-6.3-6.4c0-5.7-9.3,6.4-9.3,6.4s50.3-126.4,44-168c0,0-25.3-5-31,4.3c0,0-8-10-19.3,4.3
				c0,0,32.7-53.6,43.7-55.7s34.3,0,34.3,0S240.1,428.7,296.7,375.6z"/>
			<path class="st3" d="M309,386.1c0,0,13,29.4,23,29.4c0,0-6,7.3-14.7,0C308.7,408.1,309,386.1,309,386.1z"/>
			<path class="st3" d="M268.7,439.4c0,0-62.2-6.7-65.1,13.3c0,0,6.2,2,7.3,8C210.9,460.7,222,440.7,268.7,439.4z"/>
			<path class="st3" d="M167.3,386.1c0,0,2.1,26.7-3.3,26.7c-5.3,0-22.6,0-22.6,0s15.3,0,20.6-13.3
				C167.3,386.1,167.3,386.1,167.3,386.1z"/>
			<path class="st3" d="M164,488.1c-2,4.8-14.4,47.8-22.6,58c0,0,15-16.4,30.9-2.7c9,7.8-6.4-10-9.6-20c-5-15.2,12.2-56.3,12.2-56.3
				S166.9,481.1,164,488.1z"/>
			<path class="st0" d="M354.3,424.4l16.8,25.1l34.9,5.2c0,0,9.3,19.5,3.3,26.4s-46-11.7-46-11.7l-34,6.7l-14-38
				C315.3,438.1,322.7,416.7,354.3,424.4z"/>
			<path class="st0" d="M134,425.4l-10,28.1l-35.7,30.4c0,0,58.4,25.9,62.3,19.9s19-77.3,14.4-82.7C160.3,415.7,137.7,418.7,134,425.4
				z"/>
			<path id="right-hand" class="st1" d="M314.7,478.1c0,0,22.7-5.3,38.7-17.3c0,0,43.3-11.7,55.3-11.2c12,0.5,68,11.2,68,11.2
				s30.7,45.7,25.3,45.9c-5.3,0.1-24,8.1-42-19.2c0,0-13.2-4.3,5.4,19.2c0,0-26.1,32.8-40.7-15.9L414,476.1c0,0,15.3,34.7-5.4,41.3
				c-20.6,6.7-23.3-30-23.3-30L362,476.7C362,476.7,331.3,510.7,314.7,478.1z"/>
			<path id="left-hand" class="st1" d="M178.7,505.6c0,0-34-7.7-44.5-20.2c0,0-32.5-7.1-54-2.5c-21.5,4.5-72,15.4-75,22.7
				s2.5,46.8,2.5,46.8s25.6,13.5,23.8-26l6.2-8.4c0,0-4.5,52.9,9.5,52.9s25-6.5,19.5-29.5l-2.5-13l8-4.5c0,0,7,40,17,40s16-7,16-16
				s-11-28.5-11-28.5s19-14.1,28-13.8C122.2,505.6,169.7,546.8,178.7,505.6z"/>
		</g>
		<g id="brain">
			<path class="st4" d="M387,111c0-5.4-3.3-10-7.9-12.1c1.7-2.2,2.8-5,2.8-8.1c0-7.3-5.9-13.2-13.1-13.2c-0.7-2-1.9-3.8-3.5-5.3
				c0.3-1.1,0.5-2.3,0.5-3.5c0-7.3-5.9-13.2-13.2-13.2c0-7.3-5.9-13.2-13.2-13.2c-0.1,0-0.2,0-0.2,0c-2.7-4.4-7-7.7-12-9.2
				c-1.7-5.3-6.7-9.2-12.5-9.2c-2.3,0-4.5,0.6-6.3,1.6c-3.3-2.2-7.3-3.5-11.6-3.5c-11.7,0-21.2,9.5-21.2,21.3
				c0,11.7,9.5,21.2,21.2,21.2c2,0,4-0.3,5.9-0.8c1.3,2.3,3,4.3,4.9,6c-0.4,1.6-0.6,3.3-0.6,5c0,11.7,9.5,21.2,21.2,21.2
				c1.1,0,2.2-0.1,3.3-0.3c0.8,9.3,7.7,16.9,16.7,18.9c2.1,1.5,4.7,2.3,7.5,2.3c2.2,0,4.2-0.5,6-1.5c0.2,0.6,0.5,1.3,0.9,1.8
				c-1.1,1.9-1.8,4.2-1.8,6.6c0,7.3,5.9,13.2,13.2,13.2s13.2-5.9,13.2-13.2c0-2.4-0.7-4.6-1.8-6.6C386.4,115.6,387,113.4,387,111z"/>
			<circle class="st5" cx="325.8" cy="45" r="3.1"/>
			<circle class="st5" cx="335.8" cy="71.7" r="4.6"/>
			<circle class="st5" cx="369.5" cy="91.2" r="7.8"/>
		</g>
		<g>
			<path class="st1" d="M392.7,124.4l-25.5-14.5l-10.9-16.5l-34.1-5l-4-21.3l-18.3-16.2l9.2-37.2C275.2,3.3,242.9,3.2,242.5,3.2
				c-0.8,0-97.1,0.2-132,54c-35,54-9,133-9,133l5,98c0,0,9,57.6,72,74.8c24.3,6.7,49.8,14.9,75.4,12c17.7-2,35.4-7.3,52.6-12
				c63-17.2,72-74.8,72-74.8l5-98C383.5,190.2,393.4,160.1,392.7,124.4L392.7,124.4z"/>
			<path id="right-ear" class="right-ear st1" d="M383.5,190.2c0,0,12.8-4.8,17.4-0.8c0,0-8.7,12.7,6.7,12.7c0,0-10,6,0,14
				c0,0-4.7,10.7,13.3,10.7c0,0,9,46.1-42.2,56c0,0-1.8-16.7-7.8-20c0,0,8.7-17.6,5.3-27.4c0,0,3.3-9.9-5.3-11.2c0,0,10.7-3.3,8-16
				L383.5,190.2z"/>
			<path id="left-ear" class="left-ear st1" d="M101.5,190.2c0,0-21.3-12.8-35.3,14.5s7.3,63.3,12.7,63.3l10-6l-2.7,8.7c0,0,7.1,8.8,19.6,4.1
				c0,0,8.8-2.4,3.1-11.4c-5.7-9,0-29.3,0-29.3l-5.7-9.7c0,0-0.3-22,5.7-20.6C114.9,205.1,101.5,190.2,101.5,190.2z"/>
			<path class="st0" d="M380.6,240.1c0,0-74.7,56.7-80.7,123.3C299.9,363.4,388.2,360.2,380.6,240.1z"/>
			<path class="st0" d="M105.4,240.1c0,0,74.7,56.7,80.7,123.3C186,363.4,97.7,360.2,105.4,240.1z"/>
			<path class="st0" d="M113.2,68.4c0,0,31.6-46,72.8-46s-24.6,18-24.6,18S128.2,73.4,113.2,68.4z"/>
			<path class="st0" d="M255.8,30.4c-9.2,3,27.2,7,27.2,7S283.3,21.4,255.8,30.4z"/>
			<path class="st0" d="M254.3,61.4c-11.9,2.1,24,12,24,12S277.4,57.4,254.3,61.4z"/>
		</g>
		<g>
			<g>
				<path class="st9" d="M243.9,228.1c0,0-24,23.3-14,35.3c0,0,5.3,3.3,14-4.7c0,0,3.3,10.7,9.3,10.7s10-7.3,10-7.3
					S254.6,238.1,243.9,228.1z"/>
				<g>
					<path class="st9" d="M255.7,289.8c0,0,27.8,4.9,30.9,26.6c3,21.8-27.2,36.8-36.2,34.7c-9-2.1-48.3,6.1-46.3-37.3
						C204.1,313.8,200.3,280,255.7,289.8z"/>
					<path class="st10" d="M205.5,304.6c3.3-9.2,14.4-21.1,50.3-14.8c0,0,12.2,2.1,21.3,9.9L205.5,304.6z"/>
					<path id="tooth-01" class="tooth-01 st11" d="M271.5,297.3l4.8,5.7c0,0-2.8,6.8-5.7,7.2c-3,0.4-8.1-7.6-8.1-7.6l-0.8-5.9L271.5,297.3z"/>
					<path id="tooth-02" class="tooth-02 st11" d="M252.5,293.6c0,0-5,0-4.6,3c0.4,3,1.9,12.2,4.4,11.8c2.6-0.4,5.9-0.8,5.9-0.8l0.5-11.2
						L252.5,293.6z"/>
					<path id="tooth-03" class="tooth-03 st11" d="M238.7,291.5c0,0-8.8-2.8-10.2,1.4c-1.4,4.2,3.1,22.4,3.1,22.4l16.9-4.1
						C248.6,311.3,244.3,292.4,238.7,291.5z"/>
					<path id="tooth-04" class="tooth-04 st11" d="M225.9,310.8c0,0-11.6,4.3-10.9,1.5c0.6-2.8-0.5-13.5-0.5-13.5s6.5-6.6,7.7-5.1
						C223.4,295.3,225.9,310.8,225.9,310.8z"/>
					<polygon id="tooth-05" class="tooth-05 st11" points="211.4,310.1 212,302.4 208.3,302.9 207.3,310.7 			"/>
					<path id="tongue" class="tongue st6" d="M237.4,350.2c0,0,6.8-16.5,25.7-10.5c0,0,6.8-11.7,16.7-1.7s7.5,30.3-7.8,27.9
						S237.4,350.2,237.4,350.2z"/>
				</g>
			</g>
			<g>
				<ellipse class="st6" cx="172.9" cy="215.9" rx="37.7" ry="32.5"/>
				<circle class="st6" cx="314.6" cy="211.7" r="41.7"/>
				<g id="right-eyeball">
					<path id="right-eyewhite" class="st7" d="M352.6,205.1c0,22.7-14,41-45,41c-22.7,0-41-18.4-41-41s18.4-41,41-41
						S352.6,182.4,352.6,205.1z"/>
					<path id="right-pupil" class="st8" d="M306.8,215.9c-4.3,0-7.8-3.5-7.8-7.8c0-3.2,1.9-5.9,4.6-7.1c-1.5-0.5-3-0.7-4.6-0.7
						c-8.7,0-15.7,7-15.7,15.7s7,15.7,15.7,15.7s15.7-7,15.7-15.7c0-1.6-0.2-3.2-0.7-4.6C312.7,214,310,215.9,306.8,215.9z"/>
				</g>
				<g id="left-eyeball">
					<path id="left-eyewhite" class="st7" d="M210.6,209c0,26.4-15.1,33.7-33.7,33.7s-44-13.3-36.7-33.7c6.3-17.5,18.1-33.7,36.7-33.7
						S210.6,190.4,210.6,209z"/>
					<path id="left-pupil" class="st8" d="M191.8,200.7c-3.7,0-6.6-3-6.6-6.6c0-2.7,1.6-5,3.9-6c-1.2-0.4-2.5-0.6-3.9-0.6
						c-7.3,0-13.2,5.9-13.2,13.2s5.9,13.2,13.2,13.2s13.2-5.9,13.2-13.2c0-1.4-0.2-2.7-0.6-3.9C196.8,199.1,194.5,200.7,191.8,200.7z"
						/>
				</g>
			</g>
		</g>
	</svg>
  <p class="tip">tip: hover and click on zombie's facial features (eyeballs, ears, etc)</p>

	<h2>06: Zombie</h2>
            
          
!
            
              /* GENERAL ========================= */
body {
	background: -webkit-radial-gradient(center, ellipse cover,  #3F51B5 0%,#303F9F 41%,#1A237E 100%);
	display: flex;
	flex-direction: column;
	background-repeat: no-repeat;
	background-size: cover;
	justify-content: space-around;
	align-items: center;
	min-height: 100vh;
	font-family: 'Amatica SC', cursive;
	text-align: center;
	color: #fff;
	padding-bottom: 65px;
	font-size: 20px;
}
h1, h2 {
	margin: 0;
}
h1 {
	font-size: 50px;
}
h1 span {
	color: #B2FF59;
}
h2 {
	font-size: 30px;
}
svg {
	height: 40vh;
}
svg:hover {
	cursor: pointer;
}
a {
  color: #fff;
  text-decoration:none;
  margin: 0;
  position: absolute;
  top: 10px;
  right: 20px;
}

footer {
	background: rgba(0,0,0,0.8);
	position: absolute;
	bottom: 0;
	width: 100%;
}

/* ZOMBIE */
p.tip {
  position: absolute;
  width: 180px;
  right: 15%;
  top: 30%;
  font-size: 18px;
  letter-spacing: 1px;
  opacity: 0;
  transition: 0.5s all;
}
#zombie-person:hover + p {
  opacity: 1;
}
.right-ear:hover,
.left-ear:hover,
#left-eyeball:hover,
#right-eyeball:hover,
.tooth-01:hover,
.tooth-02:hover,
.tooth-03:hover,
.tooth-04:hover,
.tooth-05:hover,
.tongue:hover {
  animation-name: zombie-parts;
  animation-duration: 0.15s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

#right-hand,
#left-hand {
  animation-name: hand-float, hand-bob;
  animation-duration: .3s, 1.5s;
  animation-delay: 0s, .3s;
  animation-timing-function: ease-out, ease-in-out;
  animation-iteration-count: 1, infinite;
  animation-fill-mode: forwards;
  animation-direction: normal, alternate;
}
#left-hand {
	animation-delay: 0.8s;
}

.parts-fall {
	animation-name: parts-fall;
	animation-duration: 1s;
	animation-fill-mode: forwards;
	/*animation-timing-function: linear;*/
}

@keyframes hand-float {
  100% {
    transform: translateY(-8px);
  }
}

@keyframes hand-bob {
  0% {
    transform: translateY(-6px);
  }

  50% {
    transform: translateY(2px);
  }

  100% {
    transform: translateY(-6px);
  }
}

@keyframes zombie-parts {
  50% {
    transform: translateX(1px) rotate(0deg);
  }

  100% {
    transform: translateX(-2px) rotate(-1deg);
  }
}

@keyframes parts-fall {
	0% {
		transform: translateY(0px);
	}
	20% {
		transform: translateX(30px) translateY(175px);
	}
	40% {
		transform: translateX(-20px) translateY(225px);
	}
	60% {
		transform: translateX(10px) translateY(300px);
	}
	80% {
		transform: translateX(30px) translateY(375px);
	}
	100% {
		transform: translateX(0px) translateY(450px);
	}
}
            
          
!
            
              $( document ).ready(function() {

		    $('#right-eyeball').on('click',function(){
		    	$('#right-pupil').attr('class','parts-fall st8');
		    	$('#right-eyewhite').attr('class','parts-fall st7');
		    });
		    $('#left-eyeball').on('click',function(){
		    	$('#left-pupil').attr('class','parts-fall st8');
		    	$('#left-eyewhite').attr('class','parts-fall st7');
		    });
		    $('#tooth-01, #tooth-02, #tooth-03, #tooth-04, #tooth-05').on('click',function(){
		    	$(this).attr('class', 'parts-fall st11');
		    });
		    $('#right-ear, #left-ear').on('click',function(){
		    	$(this).attr('class','parts-fall st1');
		    });
		    $('#tongue').on('click',function(){
		    	$(this).attr('class','parts-fall st6');
		    });
		});
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console