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

              
                <section> 
<div class="card">
    <div class="inner">
       <div class="info">
    <h2>Your Reservation is complete!</h2>
    <h3>2pm Saturday March 14th</h3>
      <p>The cats at Miss Mittens’ Cat Cafe are ready to welcome you and your guest for lunch. It will be a purrrfect afternoon. </p>
      </div>
     </div>
    <div class="icon-space">
    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13034/cyril-small_copy.jpg"/>
  </div>
</div>

<button>Click me to animate</button>
</section>



              
            
!

CSS

              
                /* Go go google fonts! */
@import url(https://fonts.googleapis.com/css?family=Roboto+Condensed:400,300|Lato:300,400);

/* Variables */
$easeOutCust:cubic-bezier(.03,.16,.39,0.99);
$easeInQuad: cubic-bezier(0.550, 0.085, 0.680, 0.530);
$easeOutBack: cubic-bezier(0.175, 0.885, 0.320, 1.275);

$globalDelay: .5; //just so we can see what's going on even when codepen refreshes funny

/* Miles and miles of style */
body {
  background: #855082 url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/13034/graidlight.jpg');
  background-size:cover;
  font-family: 'Lato', sans-serif;
  line-height: 1.4;
  font-weight: 300;
  margin: 3em 0;
}

section {
  width:500px;
  margin:auto;
  position:relative;
}

.card {
  position:relative;
  background: rgba(255,255,255, 0.9);
  font-family: 'Roboto Condensed', sans-serif;
  padding: .5em 2em;
  border-radius: 4px;
  box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.03),0px 1px 2px 0px rgba(0,0,0,0.30);
  margin: auto;
  width: 430px;
  height:250px;  
  z-index:100;
}

.inner {
  margin:2em 0 4em 0;
}

h2 {
  color: #CB326F;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 40px;
  font-size: 2rem;
  font-weight: 300;
  margin: 0 0 .15em 0;
  }

h3 {
  margin:0 0 .5em 0;
}

p{
  margin:0; 
  color:#666666;
}

.icon-space {
    margin-top: -30px;
  
  img { 
    border-radius: 50%;
    display:block;
    margin: auto;
    border: 4px solid white;
    width: 100px;
    height:100px;
    box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.03),0px 1px 2px 0px rgba(0,0,0,0.30);
   }
}

button {
  position:relative;
  z-index: 1;
  width: auto;
  height:40px;
  display:block;
  margin: 80px auto;
  padding: 0 5%;
  border: none;
  border-radius: 4px;
  background-color:#1A9DB4;
  color: whitesmoke;
  font-size: 1em;
   font-family: 'Lato', sans-serif;
  font-weight:300;
  box-shadow: 0px 0px 0px 1px rgba(0,0,0,0.03),0px 1px 2px 0px rgba(0,0,0,0.30);
  transition: background-color .3s $easeOutCust;
    
  &:hover {background-color: #CB326F;}
}

section.reload {
  animation: 
  slideIn .65s $globalDelay+0s $easeOutBack both,
  fadeIn 0.25s $globalDelay+0s $easeInQuad both;
  
  h2, h3 {
  animation:
  slideInShort 0.25s $globalDelay+.25s $easeOutCust both, 
  fadeIn 0.1s $globalDelay+.2s $easeInQuad both;
  }
  
  p {
animation:
slideInShort 0.25s $globalDelay+.3s $easeOutCust both, 
fadeIn 0.1s $globalDelay+.25s $easeInQuad both;
}
  
  button {
  animation: slideDown .3s $globalDelay+.35s $easeOutCust both,
  fadeIn .2s $globalDelay+.3s $easeInQuad both;
}
}







@keyframes slideIn {
  from {transform:translateY(400px);}
  to {transform:translateY(0);}
}

@keyframes slideInShort {
  from {transform:translateY(80px);}
  to {transform:translateY(0);}
}

@keyframes slideDown {
  from {transform: translateY(-120px)}
  to {transform: translateY(0)}
}

@keyframes fadeIn {
  from {opacity:0;}
  to{ opaticy: 1;}
}






/* This bit is just for the credits, nothing related to the example */

.credits {
  background:#131313;
  color: whitesmoke;
  width:100%;
  height: 2em;
  padding: 1em 0 2em 0;
  margin: 0;
  position:absolute;
  left:0;
  bottom:0;
}
.credits p {
  text-align: center;
  margin: .5em 1em;
  animation: none;
}
.credits a {
  color: #D0419F;
}


              
            
!

JS

              
                $(document).ready(function() {
  
  $("button").click(function(){
    $('section').addClass("reload");

    setTimeout(function(){
      $('section').removeClass("reload");
    }, 2000);
  });
});
              
            
!
999px

Console