Pen Settings



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


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


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.


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.


.button Hover me




  background-color: #000

  display: inline-block
  position: fixed
  top: 50%
  left: 50%
  z-index: 2
  border: 2px solid rgba(#fff, 0.6)
  padding: 20px 32px
  transform: translate(-50%, -50%)
  font-family: sans-serif
  text-transform: uppercase
  color: rgba(#fff, 0.8)
  cursor: pointer
  transition: border-color 0.5s, background-color 0.5s, color 0.5s

    background-color: #fff
    border-color: transparent
    color: #444

    ~ .bg-1
      opacity: 0

    ~ .bg-2
      // To darken the picture I'm using only 70% opacity and
      // a black background color
      opacity: 0.7

  position: fixed
  top: 0
  left: 0
  z-index: 1
  width: 100%
  height: 100%
  background-repeat: no-repeat
  background-position: center center
  transition: opacity 1s

  @extends $bg
  background-image: url('//')
  opacity: 0.6

  @extends $bg
  background-image: url('//')
  opacity: 0




  Unfortunately, this method is somewhat impractical as you
  have to place background elements after the button and set
  a smaller z-index which requires absolute/fixed positioning.
  Still, not that big of a deal with only a few elements
  and it looks cool.



  * Figured out I wasn't that bright while writing
    the original code
  * Cleaned and improved the code
  * Changed Slim to Jade and Sass to Stylus - not because
    they're better or anything, I just wanted to
  * Spent a few minutes to come up with some clever changelog

  * Made some miscellaneous improvements
  * Cleaned the code even, even more

  * Improved fallback for larger resolutions
  * Cleaned the code even more

  * Translated HTML to Slim and CSS to Sass for easier
  * Made some small fixes and removed headers
  * Fixed the images again

  * Fixed the images