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="sky">
  <div class="sun-object">
    <div class="sun ray rotated"></div>
    <div class="sun ray squared"></div>
    <div class="sun orb glow"></div>
    <div class="sun orb"></div>
  </div>
  <div class="cloud alpha"></div>
  <div class="cloud beta"></div>
  <div class="cloud charlie"></div>
</div>
              
            
!

CSS

              
                .alpha {
  animation-duration: 10s;
  box-shadow: -0.1em 0.1em 2.5em 0.1em #999;
  left: 50%;
  top: 50%;
}
.beta {
  animation-duration: 15s;
  height: 5%;
  left: 20%;
  opacity: 0.7;
  top: 20%;
  width: 15%;
}
.charlie {
  animation-duration: 20s;
  height: 3%;
  left: 50%;
  opacity: 0.4;
  top: 10%;
  width: 9%;
}
.cloud {
  animation-iteration-count: infinite;
  animation-name: fluffy;
  animation-timing-function: cubic-bezier(0.1, 0.7, 0.5, 0.1);
  border-radius: 20% 70% 5% 5% / 55% 70% 25% 35%;
  height: 5vmin;
  width: 15vmin;
}
.cloud,
.cloud:before,
.cloud:after {
  background-color: #fff;
  position: absolute;
}
.cloud:after {
  height: 125%;
  left: 50%;
  top: -50%;
  width: 40%;
}
.cloud:before {
  height: 175%;
  left: 15%;
  top: -85%;
  width: 50%;
}
.cloud:before,
.cloud:after {
  border-radius: 50%;
  content: "";
}
.glow {
  animation-duration: 3s;
  animation-iteration-count: infinite;
  animation-name: shine;
  animation-timing-function: ease-in-out;
  box-shadow: 0 0 30vmin 0 #fae452;
}
.orb {
  background-image: -webkit-linear-gradient(
    top left,
    #fae65c 50%,
    #fae452 100%
  );
  background-image: linear-gradient(to bottom right, #fae65c 50%, #fae452 100%);
  border-radius: 50%;
  transition: box-shadow 1s ease-in-out;
}
.ray {
  background-color: #f9e294;
}
.rotated {
  background-image: -webkit-linear-gradient(left, #e7b439 25%, #7c612b 100%);
  background-image: linear-gradient(to right, #e7b439 25%, #7c612b 100%);
  transform: rotate(45deg);
}
.sky {
  background: #7baaf7;
  border: 1vmin solid #639bf6;
  border-bottom: none;
  border-radius: 50%;
  height: 95vmin;
  left: 50%;
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 95vmin;
}
.squared {
  background-image: -webkit-linear-gradient(
    top left,
    #f9e294 25%,
    #7c612b 100%
  );
  background-image: linear-gradient(to bottom right, #f9e294 25%, #7c612b 100%);
}
.sun {
  background-color: #fae65c;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}
.sun-object {
  height: 33%;
  left: 33%;
  position: relative;
  top: 33%;
  width: 33%;
  border: 1px solid gray;
}
body {
  background-color: #f2f2f2;
  transition: background-color ease-in-out 1s;
}
@media only screen and (max-width: 500px) {
  .sky {
    border: none;
    overflow: visible;
  }
  ::-webkit-scrollbar {
    display: none;
  }
  body {
    background-color: #7baaf7;
  }
}
@-webkit-keyframes shine {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
@keyframes shine {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}
@-webkit-keyframes fluffy {
  from {
    transform: translateX(-100vw);
  }
  to {
    transform: translateX(100vw);
  }
}
@keyframes fluffy {
  from {
    transform: translateX(-100vw);
  }
  to {
    transform: translateX(100vw);
  }
}

              
            
!

JS

              
                // taken from Inbox by Google
// i.e., the image used for empty inbox
// re-done using CSS animations + resizes based relative viewport
              
            
!
999px

Console