Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

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>Make another reservation</button>
</section>


<!-- just some credits -->
<div class="credits">
    <p>Step 1 of 4 for <a href="http://www.creativebloq.com/web-design/get-crash-course-motion-design-latest-issue-net-mag-21514216"> Design Interface Animations</a> in net magazine April 2015. More UI animation talk at: <a href="https://twitter.com/vlh">@vlh</a> and <a href="http://valhead.com/?utm_source=codepen&utm_medium=example&utm_campaign=netmagcp">valhead.com</a></p>
  </div>

              
            
!

CSS

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

$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;
}
.card {
  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;  
}

.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 {
  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 ease-out;
    
  &:hover {background-color: #CB326F;}
}

section {
  animation: 
  slideIn .85s $globalDelay+0s ease-out both,
  fadeIn 0.25s $globalDelay+0s ease-in both;
}

button {
  animation: fadeIn .3s $globalDelay+1s ease-out both;
}

@keyframes slideIn {
  from {transform:translateY(400px);}
  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;
}

.credits a {
  color: #D0419F;
}

              
            
!

JS

              
                
              
            
!
999px

Console