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 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

              
                .sun
.cloud
.tree
    .leaves
    .leaves
    .leaves
.bouncy-container 
    .bouncy
        .hair
        .left-eye.eye
            .eyebrow
            .pupil
                .reflection
        .right-eye.eye
            .eyebrow
            .pupil
                .reflection
        .nose
        .mouth
            .teeth.top
            .teeth.bottom
.chair
    .seat
    .legs-container
        .legs
        .legs
        .legs
        .legs
.balloon
    .balloon-bottom
    .balloon-string
.trampoline
.leg-container
    .leg
    .leg
    .leg
    .leg
    .leg
    .leg
.grass
              
            
!

CSS

              
                @import "compass/css3";

body {
  background: skyblue;
  height: 1000px;
  overflow: hidden;
}


// Sun
.sun {
  background: yellow;
  height: 100px;
  width: 100px;
  position: absolute;
  border-radius: 100%;
  box-shadow: 2px 2px 0 2px rgba(255, 254, 0, 0.7);
  right: 10px;
  top: 10px;
}


// Cloud
.cloud {
  top: 50px;
  width: 200px;
  height: 60px;
  right: -200px;
  background: #fff;
  border-radius: 200px;
  position: relative;
  box-shadow: 2px 2px 0 3px #eee;
  animation: moveclouds 20s linear infinite;
}
.cloud:before, .cloud:after {
  content: '';
  position: absolute; 
  background: #fff;
  width: 100px; 
  height: 80px;
  position: absolute;
  top: -15px;
  left: 10px;
  border-radius: 100px;
  transform: rotate(30deg);
}


// Tree
.tree {
  background: brown;
  height: 350px;
  width: 65px;
  position: absolute;
  bottom: 30px;
  right: 150px;
  z-index: 10;
  box-shadow: -4px -4px 0 4px rgba(174, 56, 49, 1.0);
}
.leaves {
  border-radius: 100%;
  height: 200px;
  width: 200px;
  position: absolute;
  box-shadow: -5px 5px 0 6px rgba(31, 137, 10, 1.0);
  animation: tree 1s infinite alternate;
  z-index: 11;
}
.leaves:nth-child(1) {
  bottom: 330px;
  right: 0px;
  background: rgba(21, 127, 0, 1.0);
}
.leaves:nth-child(2) {
  bottom: 300px;
  right: -130px;
  background: #1d8223;
}
.leaves:nth-child(3) {
  bottom: 430px;
  right: -70px;
  background: #319118;
}


// Mr Bouncy
.bouncy-container {
  position: absolute;
  bottom: 0px;
  margin-bottom: 260px;
}
.bouncy {
  position: relative;
  height: 300px;
  width: 300px;
  left: 100px;
  background: #CE967C;
  border-radius: 50% / 100% 100% 0 0;
  box-shadow: 5px 5px 0 5px rgba(186, 130, 104, 1.0);
  animation: bounce-face .5s infinite alternate;
  display: block;
  z-index: 6;
}
.hair {
  width: 80%;
  height: 95px;
  background: rgba(242,218,145,1.0);
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
  position: absolute;
  border-radius:100px 10px/50px 0;
  box-shadow: 2px -2px 0 3px rgba(242,218,145,0.6);
  margin: -10% 0 0 4%;
  animation: bounce-hair .5s infinite alternate;
  z-index: 7;
}
.eye {
  height: 50px;
  width: 17.5%;
  background: white;
  position: relative;
  display: inline-block;
  border-radius: 100%;
  box-shadow: 1px 1px 0 2px rgba(186, 130, 104, 0.2);
}
.left-eye {
  top: 100px;
  left: 75px;
}
.right-eye {
  top: 100px;
  left: 100px;
}
.eyebrow {
  border-radius: 100% 0 0 0 / 50% 0 0 0;
  background: rgba(242,218,145,0.5);
  position: relative;
  height: 15px;
  width: 100%;
  margin-top: -25%;
  animation: eyebrows .5s infinite alternate;
}
.pupil {
  background: black;
  height: 25px;
  width: 25px;
  top: 12.5px;
  left: 12.5px;
  position: relative;
  border-radius: 100%;
}
.reflection {
  background: white;
  height: 5px;
  width: 5px;
  border-radius: 100%;
  top: 8px;
  left: 11px;
  position: relative;
  animation: reflection .5s infinite alternate;
}
.nose {
  background: rgba(186, 130, 104, 0.5);
  height: 45px;
  width: 20px;
  position: relative;
  top: 100px;
  left: 125px;
  border-radius: 100% 10px 10px 10px;
}
.mouth {
  background: rgba(186, 130, 104, 0.5);
  height: 15px;
  width: 28%;
  position: relative;
  top: 125px;
  left: 30%;
  border-radius: 50% / 0 0 100% 100%;
  box-shadow: 0 0 0 7px rgba(186, 130, 104, 0.5);
  animation: smile .5s infinite alternate;
}
.teeth {
  background: white;
  height: 5px;
  width: 100%;  
}
.teeth.top {
  top: -2px;
  position: relative;
  border-radius:0;
  border-bottom: 3px dashed white;
}
.teeth.bottom {
  height: 8px;
  border-radius: 50% / 0 0 100% 100%;
  animation: teeth .5s infinite alternate;
}


// Chair
.chair {
  position: absolute;
  width: 100px;
  height: 100px;
  background: #333;
  bottom: 0;
  right: 300px;
  margin-bottom: 250px;
  border: 5px solid #222;
  border-bottom: none;
  box-sizing: border-box;
  z-index: 3;
}
.seat {
  background: #444;
  position: absolute;
  width: 100px;
  height: 50px;
  bottom: -55px;
  right: -26px;
  border: 5px solid #222;
  box-sizing: border-box;
  z-index: 6;
  transform: skew(40deg,0deg);
}
.legs-container {
  position: absolute;
  left: -5px;
  top: -5px;
}  
.legs {
  height: 100px;
  width: 5px;
  display: inline-block;
  position: relative;
  float: left;
  background: #222;
  z-index: 3;
}
.legs:nth-child(1) {
  top: 100px;
}
.legs:nth-child(2) {
  top: 100px;
  left: 90px;
}
.legs:nth-child(3) {
  top: 150px;
  left: 30px;
}
.legs:nth-child(4) {
  top: 150px;
  left: 120px
}


// Balloons
.balloon {
  position: absolute;
  height: 125px;
  width: 100px;
  border-radius: 100% / 100%;
  background: red;
  box-shadow: -2px 2px 0 3px rgba(234, 30, 20, 1.0);
  bottom: 500px;
  right: 350px;
  animation: balloon 1s infinite alternate;
}
.balloon-bottom {
  height: 10px;
  width: 10px;
  position: absolute;
  background: red;
  border-radius: 100%;
  top: 125px;
  left: 45px;
  z-index: 3;
  animation: balloon-bottom 1s infinite alternate;
}
.balloon-string {
  position: absolute;
  width: 2px;
  height: 350px;
  background: white;
  top: 125px;
  left: 54px;
  z-index: 2;
  animation: balloon-string 1s infinite alternate;
}


// Trampoline
.trampoline {
  position: absolute;
  background: #999;
  background: radial-gradient(ellipse at center, #777777 0%,#888888 50%,#999999 100%);
  height: 40px;
  width: 400px;
  bottom: 0;
  left: 55px;
  margin-bottom: 230px;
  border-radius: 100%;
  border: 5px dotted #333;
  box-shadow: 0 0 0 10px #555;
  z-index: 5;
  animation: bounce-trampoline .5s infinite alternate;
}
.leg-container {
  position: absolute;
  height: 40px;
  width: 400px;
  left: 60px;
  bottom: 0;
  margin-bottom: 230px;
}
.leg {
  height: 150px;
  width: 10px;
  background: #555;
  display: inline-block;
  position: relative;
  float: left;
  z-index: 4;
  box-shadow: 4px -3px 0 2px #444;
}
.leg:nth-child(1) {
  top: 50%;
  left: -3.7%
}
.leg:nth-child(2) {
  top: 100%;
  left: 25%;
  z-index: 1;
}
.leg:nth-child(3) {
  top: 100%;
  left: 65%;
}
.leg:nth-child(4) {
  top: 50%;
  left: 92.3%;
}
.leg:nth-child(5) {
  left: 13%;
}
.leg:nth-child(6) {
  left: 50%;
}

.grass {
  background: green;
  width: 100%;
  height: 200px;
  position: absolute;
  bottom: 0;
  border-top: 10px solid rgba(21, 127, 0, 0.6);
  background-color: green;
  background-image: linear-gradient(45deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
}
   
@keyframes bounce-face
{
  to { 
    border-radius: 40% / 100%;
    bottom: 3em;
  }
  from {
    bottom: 0;
  }
}
@keyframes bounce-hair
{
  from { 
    width: 58%;
    margin-left: 55px;
    border-radius: 100px 10px/70px 0;
  }
}
@keyframes bounce-trampoline
{
  from { 
    border-radius: 100% / 85%;
    margin-top: 5px;
  }
}
@keyframes moveclouds
{
  0% {margin-left: 1000px;}
	100% {margin-left: -1000px;}
}
@keyframes smile
{
  to { height: 20px; } 
}
@keyframes teeth
{
  to { margin-top: 5px; } 
}
@keyframes reflection
{
 to { top: 6px; left: 14px; }
}
@keyframes eyebrows
{
  to { margin-top: -21px; transform: rotate(3deg); }
}
@keyframes tree
{
  to { box-shadow: -1px 7px 0 6px rgba(31, 137, 10, 1.0); }
}
@keyframes balloon
{
  to { right: 370px; }
}
@keyframes balloon-bottom
{
  to { left: 35px; }
}
@keyframes balloon-string
{
  to { transform: skew(5deg,0deg); }
}
              
            
!

JS

              
                
              
            
!
999px

Console