Pen Settings



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


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.


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.


                <div class="wrap" id="wrap">
  <div class="card card--inner">
    <h2>And A Happy New Year!</h2>
    <img src="">
  <div class="card card--front back" onclick="openCard();"></div>
  <div class="card card--front" onclick="openCard();">
    <h2>Merry Christmas<br>2016</h2>

<button type="button" onclick="openCard();" id="button">Open Card</button>



                @import url('')

  margin: 0
  background-color: #4CAF50
  /*background: radial-gradient(circle at center, rgba(50,50,50,1) 0%,rgba(14,14,14,1) 35%)*/
  display: flex
  flex-direction: column
  align-items: center
  justify-content: center
  height: 100vh
  perspective: 1000px
  transform-style: preserve-3d
  max-width: 100%
*, *:after, *:before
  box-sizing: border-box

  font-family: 'Dancing Script', serif
  font-weight: normal
  font-size: 45px
  color: #009500
  text-align: center
  width: 350px
  height: 300px
  position: relative
  transform: rotateX(30deg)
  transform-style: preserve-3d
  box-shadow: 0 4px 2px rgba(0, 0, 0, .3)
  height: 100%
  width: 100%
  background-color: #fff
  border-radius: 2px
  position: relative
  border: 8px solid #B60003
  text-align: center
    display: flex
    align-items: center
    justify-content: center
    transition: all 1.5s cubic-bezier(0.4, 0.0, 0.2, 1)
    transform-origin: center left
    position: absolute
    top: 0
    left: 0
    z-index: 2
    backface-visibility: hidden
    -webkit-backface-visibility: hidden
      transform: rotateY(-180deg)
      z-index: 0
      backface-visibility: visible
      -webkit-backface-visibility: visible
    overflow: hidden
    padding: 15px
    & h2
      font-size: 32px
    & img
      max-width: 60%
      margin-top: 1.5em
      transform: translateX(-155%)
      opacity: .1
      content: ''
      position: absolute
      top: 0
      left: 0
      width: 100%
      height: 100%
      background-color: rgba(0, 0, 0, .3)
      z-index: 1
      opacity: 1
      transition: all 1s ease-in-out
  -webkit-appearance: none
  background: #E53935
  border: 5px solid darken(#E53935, 20%)
  border-width: 0 0 5px
  padding: 10px 20px
  width: 150px
  text-align: center
  display: block
  transform: rotateX(30deg)
  margin-top: 20px
  box-shadow: 0 4px 2px rgba(0, 0, 0, .3)
    border-bottom-width: 2px
    margin-top: 23px
    outline: none
    outline: none


                function openCard() {
  var button = document.getElementById('button');
  if(button.innerHTML == 'Open Card') {
    button.innerHTML = 'Close Card';
  } else {
    button.innerHTML = 'Open Card';
  var cards = document.querySelectorAll('.card');
  for(var i = 0; i < cards.length; i++) {