<article class="earth-demo">
  <div class="earth">
    <div class="more-info">
      <h1>Earth</h1>
      <ul>
        <li>Third planet from the Sun</li>
        <li>Atmosphere: 21% oxygen</li>
        <li>Liquid water on surface</li>
        <li>Only planet that has life (that we know of)</li>
      </ul>
    </div>
    <img src="https://cssanimation.rocks/images/random/earth.png">
  </div>
  <div class="moon-container">
    <div class="moon">
      <img src="https://cssanimation.rocks/images/random/moon.png">
    </div>
  </div>
</article>

body {
  -webkit-font-smoothing: antialiased;
}

.earth-demo {
  background: #000;
  position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  overflow: hidden;
}

.earth-demo:before {
  background-size: cover;
  background: url(https://cssanimation.rocks/images/random/space2.jpg) repeat center;
  content: "";
  opacity: .5;
  position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
}

.earth {
  position: absolute;
    top: calc(50% - 100px);
    left: calc(50% - 100px);

  img {
    height: 200px;
    position: absolute;
      top: 0;
      left: 0;
    width: 200px;
  }
}

.moon-container {
  position: absolute;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
}

.moon {
  animation: spin 20s linear infinite;
  background: none;
  height: 50px;
  pointer-events: none;
  transform-origin: 25px;
  width: 50px;
  z-index: 0;

  img {
    transform: translateX(-160px) translateY(-160px);
    width: 50px;
  }
}

.earth img, .moon img {
  border-radius: 50%;
  box-shadow: 0 0 12em 1em rgba(110, 140, 200, .6);
}


@keyframes spin {
  to {
    transform: rotateZ(360deg);
  }
}


View Compiled

External CSS

  1. https://fonts.googleapis.com/css?family=Space+Mono

External JavaScript

This Pen doesn't use any external JavaScript resources.