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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <img id='sun' src='https://s3.amazonaws.com/macwrightorg/2017-04-01-recently/planet-sun.png' />
<div id='p1'><img src='https://s3.amazonaws.com/macwrightorg/2017-04-01-recently/planet-1.png' /></div>
<div id='p2'><img src='https://s3.amazonaws.com/macwrightorg/2017-04-01-recently/planet-3.png' /></div>
<div id='p3'><img src='https://s3.amazonaws.com/macwrightorg/2017-04-01-recently/planet-4.png' /></div>
<div id='p4'><img src='https://s3.amazonaws.com/macwrightorg/2017-04-01-recently/planet-5.png' /></div>
              
            
!

CSS

              
                body {
  width: 640px;
  margin: 0;
  padding: 0;
}

@-webkit-keyframes orbit1 {
  from {
    -webkit-transform: rotateZ(90deg) rotateY(60deg) rotate(0deg) translateX(150px) rotate(0deg);
    transform: rotateZ(90deg) rotateY(60deg) rotate(0deg) translateX(150px) rotate(0deg);
  }
  50% {
    z-index: -1;
  }
  to {
    -webkit-transform: rotateZ(90deg) rotateY(60deg) rotate(360deg) translateX(150px) rotate(-360deg);
    transform: rotateZ(90deg) rotateY(60deg) rotate(360deg) translateX(150px) rotate(-360deg);
  }
}

@keyframes orbit1 {
  from {
    -webkit-transform: rotateZ(90deg) rotateY(60deg) rotate(0deg) translateX(150px) rotate(0deg);
    transform: rotateZ(90deg) rotateY(60deg) rotate(0deg) translateX(150px) rotate(0deg);
  }
  50% {
    z-index: -1;
  }
  to {
    -webkit-transform: rotateZ(90deg) rotateY(60deg) rotate(360deg) translateX(150px) rotate(-360deg);
    transform: rotateZ(90deg) rotateY(60deg) rotate(360deg) translateX(150px) rotate(-360deg);
  }
}

@-webkit-keyframes orbit2 {
  from {
    -webkit-transform: rotateZ(100deg) rotateY(60deg) rotate(0deg) translateX(220px) rotate(0deg);
    transform: rotateZ(100deg) rotateY(60deg) rotate(0deg) translateX(220px) rotate(0deg);
  }
  50% {
    z-index: -2;
  }
  to {
    -webkit-transform: rotateZ(100deg) rotateY(60deg) rotate(360deg) translateX(220px) rotate(-360deg);
    transform: rotateZ(100deg) rotateY(60deg) rotate(360deg) translateX(220px) rotate(-360deg);
  }
}

@keyframes orbit2 {
  from {
    -webkit-transform: rotateZ(100deg) rotateY(60deg) rotate(0deg) translateX(220px) rotate(0deg);
    transform: rotateZ(100deg) rotateY(60deg) rotate(0deg) translateX(220px) rotate(0deg);
  }
  50% {
    z-index: -2;
  }
  to {
    -webkit-transform: rotateZ(100deg) rotateY(60deg) rotate(360deg) translateX(220px) rotate(-360deg);
    transform: rotateZ(100deg) rotateY(60deg) rotate(360deg) translateX(220px) rotate(-360deg);
  }
}

@-webkit-keyframes orbit3 {
  from {
    -webkit-transform: rotateZ(70deg) rotateY(60deg) rotate(0deg) translateX(250px) rotate(0deg);
    transform: rotateZ(70deg) rotateY(60deg) rotate(0deg) translateX(250px) rotate(0deg);
  }
  50% {
    z-index: -3;
  }
  to {
    -webkit-transform: rotateZ(70deg) rotateY(60deg) rotate(360deg) translateX(250px) rotate(-360deg);
    transform: rotateZ(70deg) rotateY(60deg) rotate(360deg) translateX(250px) rotate(-360deg);
  }
}

@keyframes orbit3 {
  from {
    -webkit-transform: rotateZ(70deg) rotateY(60deg) rotate(0deg) translateX(250px) rotate(0deg);
    transform: rotateZ(70deg) rotateY(60deg) rotate(0deg) translateX(250px) rotate(0deg);
  }
  50% {
    z-index: -3;
  }
  to {
    -webkit-transform: rotateZ(70deg) rotateY(60deg) rotate(360deg) translateX(250px) rotate(-360deg);
    transform: rotateZ(70deg) rotateY(60deg) rotate(360deg) translateX(250px) rotate(-360deg);
  }
}

@-webkit-keyframes orbit4 {
  from {
    -webkit-transform: rotateZ(90deg) rotateY(60deg) rotate(0deg) translateX(250px) rotate(0deg);
    transform: rotateZ(90deg) rotateY(60deg) rotate(0deg) translateX(250px) rotate(0deg);
  }
  50% {
    z-index: -4;
  }
  to {
    -webkit-transform: rotateZ(80deg) rotateY(60deg) rotate(360deg) translateX(250px) rotate(-360deg);
    transform: rotateZ(80deg) rotateY(60deg) rotate(360deg) translateX(250px) rotate(-360deg);
  }
}

@keyframes orbit4 {
  from {
    -webkit-transform: rotateZ(90deg) rotateY(60deg) rotate(0deg) translateX(250px) rotate(0deg);
    transform: rotateZ(90deg) rotateY(60deg) rotate(0deg) translateX(250px) rotate(0deg);
  }
  50% {
    z-index: -4;
  }
  to {
    -webkit-transform: rotateZ(80deg) rotateY(60deg) rotate(360deg) translateX(250px) rotate(-360deg);
    transform: rotateZ(80deg) rotateY(60deg) rotate(360deg) translateX(250px) rotate(-360deg);
  }
}

@-webkit-keyframes sun {
  from {
    -webkit-transform: rotate(0deg) rotate(0deg);
    transform: rotate(0deg) rotate(0deg);
  }
  20% {
    -webkit-transform: rotate(10deg);
    transform: rotate(10deg)
  }
  40% {
    -webkit-transform: rotate(-5deg) translate(5px, 5px);
    transform: rotate(-5deg) translate(5px, 5px);
  }
  to {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
}

@keyframes sun {
  from {
    -webkit-transform: rotate(0deg) rotate(0deg);
    transform: rotate(0deg) rotate(0deg);
  }
  20% {
    -webkit-transform: rotate(10deg);
    transform: rotate(10deg)
  }
  40% {
    -webkit-transform: rotate(-5deg) translate(5px, 5px);
    transform: rotate(-5deg) translate(5px, 5px);
  }
  to {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
}

#sun {
  position: absolute;
  left: 220px;
  top: 100px;
  height: 200px;
  width: 200px;
  -webkit-animation: sun 20s linear infinite;
  animation: sun 20s linear infinite;
}

#p1 {
  left: 240px;
  top: 160px;
}

#p2 {
  left: 270px;
  top: 160px;
}

#p3 {
  left: 260px;
  top: 160px;
}

#p4 {
  left: 260px;
  top: 160px;
}

#p1,
#p2,
#p3,
#p4,
#p5 {
  position: absolute;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
}

#p1 {
  -webkit-animation: orbit1 16s linear infinite;
  animation: orbit1 16s linear infinite;
}

#p2 {
  -webkit-animation: orbit2 18s linear infinite;
  animation: orbit2 18s linear infinite;
}

#p3 {
  -webkit-animation: orbit3 17s linear infinite;
  animation: orbit3 17s linear infinite;
}

#p4 {
  -webkit-animation: orbit4 20s linear infinite;
  animation: orbit4 20s linear infinite;
}

#p1 img,
#p3 img,
#p4 img,
#p5 img {
  height: 80px;
  width: 160px;
}

#p2 img {
  height: 50px;
  width: 100px;
}

#p3 img {
  height: 60px;
  width: 120px;
}

#p4 img {
  height: 30px;
  width: 60px;
}
              
            
!

JS

              
                
              
            
!
999px

Console