123

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. 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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="container" ontouchstart="this.classList.toggle('hover');">
  <div class="card">  
    <div class="card_front">
      <h1 class="card-symbol">&#128628;</h1>
    </div>

    <div class="card_back">
      <h1 class="card-symbol">&#128628;</h1>
      <div class="card-text">
        <p>The word <strong>ampersand</strong> is a corruption of the phrase "and per se & (and)", meaning "and intrinsically the word and (represented by the symbol &)".</p>
      <p>The ampersand can be traced back to the 1st century A.D. and the Old Roman cursive, in which the letters E and T occasionally were written together to form a ligature.</p>
      </div>
    </div>    

  </div>
</div>

            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Cantata+One');
@import url('https://fonts.googleapis.com/css?family=Lato');

html {
  box-sizing: border-box;
  font-family: 'Lato', sans-serif;
}
*, *:before, *:after {
  box-sizing: inherit;
}

body {
  background-color: #bdc2e8;
  background-image: linear-gradient(to top, #bdc2e8 0%, #bdc2e8 1%, #e6dee9 100%);
  background-repeat: no-repeat;
}

/* CARD STYLING */

.container,
.card,
.card_front,
.card_back {
  width: 397px;
  height: 640px;
  margin: 3em auto;  
}

.card_front,
.card_back {  
/*   height: 100%; */
  background: url('http://i280.photobucket.com/albums/kk195/thelittleblacksmith/lobster-nebula_zps2j1cvbkx.jpg') no-repeat;
  box-shadow: 0px 5px 25px 0px rgba(51,51,51,0.28); 
}

.card-symbol {
  margin: 0;
  width: 100%;
  text-align: center;
  color: #000;
  font-family: 'Cantata One', serif;
  font-size: 13em;  
  mix-blend-mode: lighten;
}

@supports(display:flex){
 .card_front {  
    display: flex;
    align-items: center;
    justify-content: center;
  } 
  
  .card_front .card-symbol {  
    margin: 0 0.15em;
    border-radius: 50%;
    font-size: 15em;  
  }
}

.card_front {
  position: relative;
  padding: 0 1em;
}

.card_front .card-symbol {    
  font-size: 15em;  
}



.card_back {
/*   display: none; */
  padding: 1em;
}

.card_front > *,
.card_back > * {
  background-color: white;
  background-color: rgba(255, 255, 255, 0.75);  
}

.card-text {
  padding: 0 4.5em 1em;
  line-height: 1.4;
}

p:first-of-type {    
  margin-top: 0;
  padding: 1.5em 0 0;
  border-top: 8px solid #333;
}

/* FLIP CARD STYLING */
.container {
  perspective: 1000px;
}

.container:hover .card, 
.container.hover {
  transform: rotateY(-180deg);
}

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

.card_front,
.card_back {
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
}

.card_front {
  z-index: 2;
  transform: rotateY(0deg);
}

.card_back {
  transform: rotateY(-180deg);
}
            
          
!
            
              /*  
TUTORIALS:

CSS Flip: https://davidwalsh.name/css-flip
Knockout Text: https://codepen.io/thebabydino/pen/qONMLv?editors=110

*/
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console