Pen Settings

HTML

CSS

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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

Behavior

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.

HTML

              
                <div id="content">
  <p>Hover over the images to see the effect</p>
  <div class="container">
    <div class="flipper">
      <div class="front">
        <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-1/cherry-blossoms-unsplash.jpg" alt="cherry blossoms">
        <p class="caption">Cherry blossom</p>
      </div>
      <div class="back">
        <a href="https://en.wikipedia.org/wiki/Cherry_blossom" target="_blank">
          <h1>Cherry blossom</h1>
        </a>
        <p class="date">23/07/1997</p>
        <p class="description">A cherry blossom is the flower of any of several trees of genus Prunus, particularly the Japanese cherry, Prunus serrulata, which is called sakura after the Japanese (桜 or 櫻; さくら).</p>
      </div>
    </div>
  </div>

  <div class="container">
    <div class="flipper">
      <div class="front">
        <img src="https://images.pexels.com/photos/69776/tulips-bed-colorful-color-69776.jpeg?auto=compress&cs=tinysrgb&h=650&w=940" alt="white daisy">
        <p class="caption">Tulip</p>
      </div>
      <div class="back">
        <a href="https://en.wikipedia.org/wiki/Tulip" target="_blank">
          <h1>Tulip</h1>
        </a>
        <p class="date">14/07/2001</p>
        <p class="description">Tulips (Tulipa) form a genus of spring-blooming perennial herbaceous bulbiferous geophytes. The flowers are usually large, showy and brightly coloured, generally red, yellow, or white.</p>
      </div>
    </div>
  </div>

  <div class="container">
    <div class="flipper">
      <div class="front">
        <img src="https://images.pexels.com/photos/796658/pexels-photo-796658.jpeg?auto=compress&cs=tinysrgb&h=750&w=1260" alt="Red Purple and Yellow Tulip">
        <p class="caption">Lavender</p>
      </div>
      <div class="back">
        <a href="https://en.wikipedia.org/wiki/Lavandula" target="_blank">
          <h1>Lavender</h1>
        </a>
        <p class="date">06/08/2004</p>
        <p class="description">Lavandula is a genus of 47 known species of flowering plants in the mint family. The most widely cultivated species is often referred to as lavender, and there is a color named for the shade of its the flowers. </p>
      </div>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Raleway|Reenie+Beanie);

* {
  box-sizing: border-box;
}

html,
body {
  margin: 5%;
  font-family: "Raleway", sans-serif;
  line-height: 1.5em;
}

img {
  width: 100%;
}

a {
  color: black;
}

.caption,
h1,
.date {
  margin: 0;
  text-align: center;
}

.caption,
h1 {
  font-family: "Reenie Beanie", sans-serif;
  font-size: 2em;
  padding: 10px 10px 0 10px;
}

.date {
  font-size: 0.75em;
}

.description {
  font-size: 0.9em;
  padding: 0 20px 20px 20px;
  text-align: left;
}

.container {
  perspective: 1000px;
  display: inline-block;
  margin: 3%;
}

.container:hover .flipper {
  transform: rotateY(180deg);
}

.container,
.front,
.back {
  width: 250px;
  height: 250px;
}

.flipper {
  transition: 0.6s;
  transform-style: preserve-3d;
  position: relative;
}

.front,
.back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 250px;
  height: 250px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.front {
  z-index: 2;
}

.back {
  transform: rotateY(180deg);
}

#content {
  text-align: center;
}

              
            
!

JS

              
                
              
            
!
999px

Console