cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

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.

            
              .cover
.center
  .moon
    span moon
  .moon.moon-anime
    span mouse over
  .border-moon
    span border moon
            
          
!
            
              .moon
  position: relative
  display: block
  margin: 2rem
  width: 10rem
  height: 10rem
  background-color: transparent
  box-shadow: inset -12px 5px 0 3px #f3d076
  border-radius: 50%
  span
    line-height: 10rem
    
.moon-anime
  background-color: #00afec
  box-shadow: inset -12px 5px 0 20px transparent
  border-radius: .3rem
  transition: .25s
  &:hover
    background-color: transparent
    border-radius: 50%
    box-shadow: inset -12px 5px 0 3px #f3d076

// Border Moon
.border-moon
  position: relative
  display: block
  margin: 2rem
  width: 10rem
  height: 10rem
  background-color: transparent
  border-radius: 50%
  overflow: hidden
  &:before
    position: absolute
    content: ''
    display: block
    top: -20px
    left: -45px
    width: 10rem
    height: 10rem
    border: 30px solid #f3d076
    border-radius: 50%
  span
    line-height: 10rem
    
body
  color: #fff
  margin: 0
  background-color: #333
  background-image: url(https://media.giphy.com/media/Vb0Zb7wYQpAwU/giphy.gif)
  background-repeat: no-repeat
  background-size: cover
.cover
  position: fixed
  top: 0
  width: 100%
  height: 100%
  background-color: rgba(0,0,0,.5)
.center
  position: absolute
  top: 50%
  text-align: center
  margin-top: -10rem
  width: 100%
  display: flex
  flex-direction: row
  justify-content: center
            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console