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

              
                <section>
  <div class="shadow"></div>
  <div class="moon">
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
    <span></span>
  </div>
  <p>	
✦</p>
  <p>✦</p>
  <p>✦</p>
  <p>✦</p>
  <p>✦</p>
  <p>✦</p>
  <div class="deathstar-wrap">
  <svg class="deathstar" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" baseProfile="tiny" height="512px" id="Layer_1" version="1.2" viewBox="0 0 512 512" width="512px" xml:space="preserve"><path d="M505.122,245.073c-0.55-15.348-2.304-30.38-5.473-44.904H397.809v-17.961h35.923v-17.961h-71.846v-17.962h53.885v-17.961  h-17.962v-17.961h-35.923V92.399h17.962V74.438h-35.924V56.477h17.962V38.515V27.114C329.189,11.561,292.74,2.592,254.116,2.592  C118.264,2.592,7.87,110.385,3.104,245.073H505.122z M164.309,56.477c39.671,0,71.846,32.175,71.846,71.846  c0,39.683-32.175,71.846-71.846,71.846c-39.689,0-71.847-32.164-71.847-71.846C92.462,88.652,124.62,56.477,164.309,56.477"/><path d="M308.001,487.554h-17.962v-17.961h53.885v-17.962h17.962v-17.962h53.885v-17.961h17.961v-17.962h-35.923v-17.961h-53.885  v-17.962h35.924v-17.962h71.846V325.9h-35.923v-17.962h83.879c3.169-14.523,4.923-29.55,5.473-44.904H3.104  c4.765,134.7,115.16,242.481,251.012,242.481c18.522,0,36.52-2.14,53.885-5.929V487.554z"/></svg>
    </div>
</section>
              
            
!

CSS

              
                body {
  background-color: #2e688d;
  text-align: center;
  display: flex;
  align-items: center;
  min-height: 100vh;
  font-family: Arial, "Zapf Dingbats";
}
section {
  margin: 0px auto;
  position: relative;
  padding: 100px;
}
.moon {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background-color: #ffffff;
  position: relative;
  z-index: 2;
  box-shadow: inset -27px -27px 0px 0px #d2d3d5;
  transition: transform ease-in 10s;
  &:hover {
    transform: rotate(360deg);
    transition: transform ease-in 10s;
  }
}
.shadow {
  display: block;
  width: 350px;
  height: 350px;
  background-color: #224f6b;
  border-radius: 50%;
  position: absolute;
  z-index: -2;
  top: 50%;
  left: 50%;
  transform: translate(-45%, -45%);
}
span {
  display: block;
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #d2d3d5;
  box-shadow: inset 2px 2px 0px 0px #bebfc1;
  border: 2px solid white;
}
span:nth-child(1) {
  bottom: 20px;
  right: 112px;
  width: 80px;
  height: 80px;
  box-shadow: inset 4px 8px 0px 0px #bebfc1;
  border: 4px solid white;
}
span:nth-child(2) {
  bottom: 20px;
  left: 130px;
  width: 15px;
  height: 15px;
}
span:nth-child(3) {
  top: 88px;
  right: 25px;
  width: 15px;
  height: 15px;
}
span:nth-child(4) {
  bottom: 124px;
  right: 26px;
  width: 25px;
  height: 25px;
}
span:nth-child(5) {
  bottom: 102px;
  right: 79px;
  width: 20px;
  height: 20px;
}
span:nth-child(6) {
  top: 95px;
  right: 53px;
  width: 40px;
  height: 40px;
}
span:nth-child(7) {
  top: 90px;
  left: 102px;
  width: 55px;
  height: 55px;
}
span:nth-child(8) {
  top: 45px;
  left: 150px;
  width: 30px;
  height: 30px;
}
span:nth-child(9) {
  top: 150px;
  left: 170px;
  width: 22px;
  height: 22px;
}
span:nth-child(10) {
  top: 140px;
  left: 70px;
  width: 25px;
  height: 25px;
}
span:nth-child(11) {
  top: 100px;
  left: 33px;
  width: 15px;
  height: 15px;
}
span:nth-child(12) {
  top: 40px;
  left: 120px;
  width: 15px;
  height: 15px;
}
span:nth-child(13) {
  top: 215px;
  left: 52px;
  width: 15px;
  height: 15px;
}
p {
  color: white;
  font-size: 50px;
  position: absolute;
  transition: all ease-in 0.8s;
  &:hover {
    color: #faf26e;
    transition: all ease-in 0.5s;
    transform: scale(2);
  }
}
p:nth-of-type(1) {
  top: 20px;
  left: 60px;
}
p:nth-of-type(2) {
  top: 90px;
  right: 80px;
  font-size: 20px;
}
p:nth-of-type(3) {
  bottom: 10px;
  right: 10px;
  font-size: 50px;
}
p:nth-of-type(4) {
  bottom: 00px;
  left: 40px;
  font-size: 80px;
}
p:nth-of-type(5) {
  top: -100px;
  left: 250px;
  font-size: 60px;
}
p:nth-of-type(6) {
  bottom: -40px;
  left: 250px;
  font-size: 30px;
}
.deathstar {
  width: 20px;
  height: auto;
  transition: transform 5s ease, fill 5s ease;
  z-index: 5;
}

.deathstar-wrap {
  width: 20px;
  height: auto;
  fill: white;
  position: absolute;
  top: 10px;
  right: 10px;
}

.deathstar-wrap:before {
  content:'';
  display: block;
  width: 300px;
  height: 5px;
  background-color: red;
  transform: rotate(-45deg);
  transform-origin: top right;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: -1;
  width: 0;
  opacity: 0;
}

.deathstar-wrap:hover:before {
  opacity: 1;
  width: 300px;
  transition: width 1s ease, opacity 1s linear,  transform 1s ease;
}

// .deathstar:hover {
//   fill: black;
//   transform: scale(200);
//   transition: transform 5s ease, fill 5s ease;
// }
              
            
!

JS

              
                
              
            
!
999px

Console