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

              
                <html>

<body>
  <div class="wall">
    <div class="pin"></div>
    <div class="string-left"></div>
    <div class="string-right"></div>
    <div class="frame">
      <div class="sky">
        <div class="cloud1"></div>
        <div class="cloud2"></div>
        <div class="cloud3"></div>
        <div class="cloud4"></div>
        <div class="sun"></div>
        <div class="moon"></div>
      </div>
      <div class="ground"></div>
      <div class="tree"></div>
      <div class="bird1"></div>
    </div>
  </div>

</body>

</html
              
            
!

CSS

              
                body {
  padding: 0;
  margin: 0;
}

.wall {
  background: linear-gradient(#f69475, #a12825);
  position: relative;
  flex: 1;
  padding: 3em;
  height: 100vh;
}

.pin {
  position: absolute;
  background: #ffcc50;
  border-radius: 50%;
  width: 8px;
  height: 8px;
  left: calc(50% - 4px);
  top: 3em;
  z-index: 1;
  box-shadow: 0px 3px 0px -1px rgba(0, 0, 0, 0.3);
}

.string-left {
  position: absolute;
  background: #5b523c;
  width: 200px;
  height: 2px;
  left: calc(50% - 200px);
  top: calc(3em + 30px);
  transform: Rotate(-15deg);
  box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.3);
}

.string-right {
  position: absolute;
  background: #5b523c;
  width: 200px;
  height: 2px;
  left: calc(50% - 0px);
  top: calc(3em + 30px);
  transform: Rotate(15deg);
  box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.3);
}

.frame {
  margin: 3em auto;
  width: 640px;
  height: 360px;
  border: 1em outset #eb9b4a;
  border-radius: 1em;
  position: relative;
  overflow: hidden;
  box-shadow: 0px 13px 0px -8px rgba(0, 0, 0, 0.3);
  position: relative;
}

.sky {
  background: #cee;
  width: 100%;
  height: 100%;
  animation-name: sky-animation;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

.cloud1,
.cloud2,
.cloud3,
.cloud4 {
  position: absolute;
  padding: 20px 50px;
  background-color: white;
  border-radius: 50%;
  opacity: 0.2;
  animation-name: cloud-animation;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
.cloud1::after,
.cloud2::after,
.cloud3::after,
.cloud4::after {
  content: "";
  position: absolute;
  padding: 20px 40px;
  background-color: white;
  border-radius: 50%;
  opacity: 0.5;
  top: 10px;
  right: -20px;
}
.cloud1 {
  left: 40px;
  top: 20px;
}
.cloud2 {
  left: 250px;
  top: 80px;
}
.cloud3 {
  left: 500px;
  top: 120px;
}
.cloud4 {
  left: 600px;
  top: 140px;
}

.sun {
  background: #ffffbb;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  position: absolute;
  left: 320px;
  top: 25px;
  animation-name: sun-animation;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  transform-origin: 0px 300px;
}

.moon {
  background: #eeffff;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  position: absolute;
  left: 320px;
  top: 25px;
  animation-name: moon-animation;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  transform-origin: 0px 300px;
}

.tree {
  position: absolute;
  width: 10px;
  height: 50px;
  left: 200px;
  bottom: 50px;
  background: linear-gradient(0deg, #65350b, #25150b);
  border-radius: 2px;
}
.tree::before {
  content: "";
  position: absolute;
  left: 6px;
  animation-name: tree-animation;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  transform-origin: top left;
  box-shadow: 1px 2px 10px 5px rgba(0, 0, 0, 0.3);
}
.tree::after {
  content: "";
  position: absolute;
  left: -15px;
  top: -25px;
  bottom: 50px;
  width: 40px;
  height: 50px;
  background: linear-gradient(0deg, #1f4c1f, #5f8c1f);
  border-radius: 40%;
  animation-name: tree-green-animation;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
.bird1 {
  /*   border: 2px solid #333;
  height: 20px;
  width: 20px;
  position: absolute;
  left: -200px;
  top: 250px;
  animation-name: bird1-animation;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear; */
}

.ground {
  background: #6d7f53;
  width: 2000px;
  height: 200px;
  border-radius: 50%;
  position: absolute;
  left: calc(50% - 1000px);
  bottom: -100px;
  animation-name: ground-animation;
  animation-duration: 8s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

/* Animations */
@keyframes bird1-animation {
  0% {
    transform: translateX(200px);
  }
  25% {
  }
  50% {
  }
  75% {
    transform: translateX(600px);
  }
  100% {
    transform: translateX(600px);
  }
}
@keyframes tree-animation {
  0% {
    transform: rotate(0deg);
    bottom: -400px;
    height: 400px;
  }
  25% {
    bottom: 0px;
    height: 0px;
  }
  50% {
    transform: rotate(180deg);
    bottom: 0px;
    height: 0px;
  }
  75% {
    bottom: 0px;
    height: 0px;
  }
  100% {
    transform: rotate(360deg);
    bottom: -400px;
    height: 400px;
  }
}
@keyframes tree-green-animation {
  0% {
    background: linear-gradient(0deg, #1f4c1f, #5f8c1f);
  }
  25% {
    background: linear-gradient(45deg, #1f4c1f, #5f8c1f);
  }
  50% {
    background: linear-gradient(90deg, #1f4c1f, #5f8c1f);
  }
  75% {
    background: linear-gradient(135deg, #1f4c1f, #5f8c1f);
  }
  100% {
    background: linear-gradient(180deg, #1f4c1f, #5f8c1f);
  }
}
@keyframes sun-animation {
  0% {
    background-color: #ffffbb;
    box-shadow: 1px 2px 10px 5px rgba(255, 200, 30, 0.3);
  }
  25% {
    background-color: #ff9999;
  }
  50% {
    background-color: #ff9933;
    transform: rotate(180deg);
    box-shadow: 1px 2px 10px 5px rgba(255, 200, 30, 0.6);
  }
  75% {
    background-color: #ff9933;
  }
  100% {
    background-color: #ffff99;
    transform: rotate(360deg);
    box-shadow: 1px 2px 10px 5px rgba(255, 200, 70, 0.8);
  }
}
@keyframes moon-animation {
  0% {
    background-color: #99ffff;
    transform: rotate(-180deg);
    box-shadow: 1px 2px 10px 5px rgba(255, 255, 255, 0.2);
  }
  25% {
    background-color: #99ffff;
  }
  50% {
    background-color: #ffffff;
    transform: rotate(0deg);
    box-shadow: 1px 2px 10px 5px rgba(255, 255, 255, 0.8);
  }
  75% {
    background-color: #bbffff;
  }
  100% {
    background-color: bbffff;
    transform: rotate(180deg);
    box-shadow: 1px 2px 10px 5px rgba(255, 255, 255, 0.2);
  }
}
@keyframes sky-animation {
  0% {
    background-color: #cee;
  }
  25% {
    /*     background-color: #99f; */
  }
  50% {
    background-color: black;
  }
  75% {
    /*     background-color: black; */
  }
  100% {
    // background-color: black;
  }
}
@keyframes ground-animation {
  0% {
    background-color: #6d7f53;
  }
  25% {
    /*     background-color: #99f; */
  }
  50% {
    background-color: #29301f;
  }
  75% {
    /*     background-color: black; */
  }
  100% {
    // background-color: black;
  }
}
@keyframes cloud-animation {
  0% {
    transform: translateX(-300px);
  }
  100% {
    transform: translateX(300px);
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console