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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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="ground"></div>

<!-- Rabbit -->
<div class="rabbit">
  <div class="shadow"></div>
  <div class="ear ear-left"></div>
  <div class="head">
    <div class="eye"></div>
  </div>
  <div class="ear ear-right"></div>
  <div class="body">
    <div class="legs"></div>
  </div>
  <div class="tail"></div>
</div>

<!-- Egg -->
<div class="egg">
  <div class="dance">
    <div class="leg-left"></div>
    <div class="leg-right"></div>
    <div class="body">
      <div class="eye eye-left"></div>
      <div class="eye eye-right"></div>
      <div class="mouth">
        <div class="tongue"></div>
      </div>
    </div>
    <div class="arm arm-left"></div>
    <div class="arm arm-right"></div>
  </div>
</div>

<!-- Chicken -->
<div class="chicken">
  <div class="leg leg-left"></div>
  <div class="eye eye-left"></div>
  <div class="crest"></div>
  <div class="tail"></div>
  <div class="body">
    <div class="eye eye-right"></div>
    <div class="under-beak"></div>
    <div class="beak-top"></div>
    <div class="beak-bottom"></div>
    <div class="arm"></div>
    <div class="leg leg-right"></div>
  </div>
</div>
              
            
!

CSS

              
                body {
	background-color: #00bcd4;
	margin: 0;
}
.ground {
	background-color: #8bc34a;
	position: absolute;
	bottom: 0;
	width: 100%;
	height: 150px;
}


/*
* Rabbit
*/
.rabbit {
	position: absolute;
	bottom: 120px;
	left: 150px;
}
.rabbit > * {
	--transform: translate3d(0,0,0);
	animation: 10s jumpBody infinite;
}
.rabbit .ear {
	height: 20px;
	width: 100px;
	background-color: #fff;
	border-radius: 10px;
	position: absolute;
	right: -15px;
	top: -27px;
	transform-origin: bottom right;
	--transform: rotate(10deg);
	transform: var(--transform);
}
.rabbit .ear.ear-left {
	background-color: #a9d9ff;
	--transform: rotate(25deg);
	transform: var(--transform);
	top: -25px;
}
.rabbit .body {
	height: 75px;
	width: 75px;
	background-color: #fff;
	border-radius: 50%;
	position: relative;
}
.rabbit .head {
	height: 60px;
	width: 60px;
	background-color: #fff;
	border-radius: 50%;
	position: absolute;
	top: -35px;
	right: -35px;
}
.rabbit .head .eye {
	background-color: #AA4FCC;
	position: absolute;
	top: 30px;
	left: 20px;
	height: 8px;
	width: 8px;
	border-radius: 50%;
	animation: 5s rabbitEye infinite;
}
.rabbit .tail {
	height: 20px;
	width: 20px;
	background-color: #fff;
	border-radius: 50%;
	position: absolute;
	left: -16px;
	bottom: 17px;
}
.rabbit .legs {
	height: 15px;
	width: 60px;
	background-color: #fff;
	border-radius: 8px;
	position: absolute;
	bottom: 0;
	left: 30px;
	transform-origin: left;
	animation: 10s jumpLegs infinite;
}
.rabbit:before {
	content: "";
	width: 150px;
	height: 20px;
	border-radius: 50%;
	background-color: rgba(0,0,0,0.3);
	position: absolute;
	bottom: -5px;
	left: -20px;
	animation: 10s jumpShadow infinite;
}

@keyframes rabbitEye {
	2%{height: 4px;top: 32px;}
	4%{height: 8px;top: 30px;}
}
@keyframes jumpBody {
	4% {transform: var(--transform);}
	8% {transform: translate3d(0, -50px, 0) var(--transform);}
	16% {transform:  var(--transform);}
}
@keyframes jumpLegs {
	4% {transform: rotate(0);}
	6% {transform: rotate(20deg);}
	10% {transform: rotate(0);}
}
@keyframes jumpShadow {
	4% {width: 150px;left: -20px;}
	8% {width: 130px; left: -10px;}
	16% {width: 150px;left: -20px;}
}


/*
* Egg
*/
.egg {
	position: absolute;
	bottom: 110px;
	left: 400px;
	transform-origin: bottom;
}
.egg .dance {
	position: absolute;
	bottom: 20px;
	animation: 2s dance linear infinite;
}
.egg .body {
	width: 150px;
	height: 200px;
	background-color: #fff;
	border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
	box-shadow: -10px 10px 0 10px #eee;
	position: relative;
}
.egg .eye {
	position: absolute;
	height: 10px;
	width: 10px;
	border-radius: 50%;
	background-color: #000;
	top: 120px;
	left: 85px;
	animation: 7s eggEye 3s infinite;
}
.egg .eye-left {
	left: 45px;
}
.egg .mouth {
	width: 30px;
	height: 15px;
	background-color: #000;
	border-radius: 0 0 30px 30px;
	position: absolute;
	top: 135px;
	left: 55px;
	overflow: hidden;
}
.egg .tongue {
	height: 15px;
	width: 15px;
	background-color: red;
	position: absolute;
	top: 8px;
	left: 8px;
	border-radius: 50%;
}
.egg .arm {
	height: 10px;
	width: 60px;
	position: absolute;
	background-color: #000;
	border-radius: 5px;
	top: 140px;
	animation: 1s danceArms linear infinite;
}
.egg .arm-left {
	transform-origin: right;
	transform: rotate(20deg);
	--to: rotate(-20deg);
	left: -70px;
}
.egg .arm-right {
	transform-origin: left;
	--transform: rotate(-20deg);
	--to: rotate(20deg);
	transform: var(--transform);
	right: -50px;
}
.egg .leg-left {
	height: 50px;
	width: 10px;
	position: absolute;
	background-color: #000;
	border-radius: 5px;
	transform-origin: right;
	--transform: rotate(20deg);
	transform: var(--transform);
	bottom: -50px;
	left: 30px;
}
.egg .leg-right {
	height: 50px;
	width: 10px;
	position: absolute;
	background-color: #000;
	border-radius: 5px;
	transform-origin: left;
	transform: rotate(-20deg);
	bottom: -50px;
	right: 50px;
}
.egg:before {
	content: "";
	width: 130px;
	height: 20px;
	border-radius: 50%;
	background-color: rgba(0,0,0,0.3);
	position: absolute;
	bottom: -60px;
	left: -10px;
	animation: 2s danceShadow linear infinite;
}

@keyframes eggEye {
	2%{height: 4px;top: 123px;}
	4%{height: 10px;top: 120px;}
}
@keyframes dance {
	25% {
		bottom: 0px;
		transform: rotate(10deg);
	}
	50% {bottom: 20px;}
	75% {
		bottom: 0px;
		transform: rotate(-10deg);
	}
}
@keyframes danceShadow {
	25% {width: 150px; left: -30px;}
	50% {width: 130px; left: -10px;}
	75% {width: 150px; left: -10px;}
}
@keyframes danceArms {
	50% {transform: var(--to)}
}


/*
* Chicken
*/
.chicken {
	position: absolute;
	bottom: 140px;
	left: 700px;
	transform-origin: bottom;
}
.chicken .body {
	width: 150px;
	height: 170px;
	background-color: #fff;
	border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
	box-shadow: 7px 7px 0 7px #eee;
	position: relative;
}
.chicken .eye {
	position: absolute;
	height: 15px;
	width: 15px;
	border-radius: 50%;
	background-color: #000;
	top: 50px;
	left: 50px;
	animation: 8s chickenEye 1s infinite;
}
.chicken .eye-left {
	left: 0;
}
.chicken .beak-top {
	width: 27px;
	height: 15px;
	background-color: #FFDA0F;
	border-radius: 30px 30px 0 0;
	position: absolute;
	top: 70px;
	left: -10px;
	border-left: 3px solid #fff;
}
.chicken .beak-bottom {
	width: 20px;
	height: 7px;
	background-color: #f0ba43;
	border-radius: 0 0 20px 20px;
	position: absolute;
	top: 85px;
	left: -1px;
}
.chicken .arm {
	width: 40px;
	height: 20px;
	border-radius: 0 0 40px 100px;
	position: absolute;
	top: 100px;
	left: 75px;
	border: 5px solid;
	border-color: transparent transparent #000 #000;
}
.chicken .leg {
	position: absolute;
	width: 10px;
	height: 30px;
	border-radius: 10px;
	background-color: #FFDA0F;
	bottom: -35px;
	left: 80px;
}
.chicken .leg-left {
	left: 55px;
	background-color: #f0ba43;
}
.chicken .under-beak {
	height: 20px;
	width: 15px;
	background-color: #A20000;
	position: absolute;
	top: 85px;
	left: 5px;
	border-radius: 20px 2px 8px 8px;
}
.chicken .crest {
	width: 30px;
	height: 40px;
	background-color: #A20000;
	border-radius: 40px 40px 0 0;
	position: absolute;
	top: -25px;
	left: 45px;
	border-left: 6px solid #D30700;
	transform: rotate(-10deg);
	box-shadow: 31px 14px 0 0 #A20000, 27px 14px 0 3px #D30700, 50px 30px 0 0 #A20000;
}
.chicken .tail {
	width: 30px;
	height: 70px;
	background-color: #A20000;
	border-radius: 40px 40px 0 0;
	position: absolute;
	top: 90px;
	right: -25px;
	border-right: 6px solid #D30700;
	transform: rotate(50deg);
	box-shadow: -23px -10px 0 0 #A20000;
}
.chicken:before {
	content: "";
	width: 150px;
	height: 20px;
	border-radius: 50%;
	background-color: rgba(0,0,0,0.3);
	position: absolute;
	bottom: -45px;
}

@keyframes chickenEye {
	2%{height: 7px;top: 58px;}
	4%{height: 15px;top: 50px;}
	6%{height: 7px;top: 58px;}
	8%{height: 15px;top: 50px;}
}
              
            
!

JS

              
                /*
* Happy Easter to Everybody !
*/
              
            
!
999px

Console