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

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

              
                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Collapsible Nav using Checkbox</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
body { 
  -webkit-text-size-adjust:none; 
  -ms-text-size-adjust:none; 
}
input { display:none; }
@media (max-width:480px) {
    #logo {height:28px !important;
      margin-top:3px;
    }
    .main-table, .main-content img { width:100% !important;}
    #navcontainer{
      position:relative;
    }
    #navcontainer th{
      display:block;
      width: 100%;
      border-bottom:2px solid #ffffff;
      height:18px;
      padding: 10px 0px;      
    }
    #menucontainer{
      position:relative;
      overflow:hidden;
    }
    #navcontainer table{
      margin-top:-500px;
      -ms-transition: margin-top .5s ease-in-out;
      -webkit-transition: margin-top .5s ease-in-out;      
    }
    /* checkbox mechanism */
    #navcheckbox:checked + table{
      margin-top:0%;
    }      
    /* fallback hover mechanism */
    .nav-over,.nav-under{
     display:block !important;
     max-height:none !important;
     padding-top:3px;
     padding-bottom:3px;
    } 
    .nav-over img,.nav-under img{
     display:block;
     float:right;
     margin-right:5px;
    } 
    /*
    to deal with quirks in windows 8.1 and Outlook iOS
    */
    .nav-over{
     -ms-transition-delay: 1.5s;
     -webkit-transition-delay: 1.5s;            
    }
    #navcontainer > .nav-over:hover + div table{
      margin-top:0% !important;
    }
    #navcontainer > .nav-over:hover{
      visibility:hidden;
    }
} 

</style>
<style>
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .effects{
    position:relative;
    overflow:hidden;
  }
  .fallback{
    opacity:0;
  }
  .intro1{
     -webkit-animation: flytop1 2s ease; 
  }
  .intro2{
     -webkit-animation: flytop1 4s ease; 
  }
  @-webkit-keyframes flytop1
  {
    0% {-webkit-transform: translateY(-1000px);}
    25% {-webkit-transform: translateY(-1000px);}       
    50%,100% {-webkit-transform: translateY(0px);}
  }
  @-webkit-keyframes flytop1
  {
    0% {-webkit-transform: translateY(-1000px);}
    40% {-webkit-transform: translateY(-1000px);}       
    50%,100% {-webkit-transform: translateY(0px);}
  }  
  .intropop{
    -webkit-animation: popin 6s ease; 
  }

  @-webkit-keyframes popin
  {
    0% { 
      opacity:0;
      -webkit-transform: scale(0.75);
    }        
    40% { 
      opacity:0;
      -webkit-transform: scale(0.75);
    }        
    45% { 
      opacity:1;
      -webkit-transform: scale(1.1);
    }
    50%,100% { 
      opacity:1;
      -webkit-transform: scale(1);
    }
  }
  .delorean{
    -webkit-animation: flyright 10s ease; 
  }
  @-webkit-keyframes flyright
  {
    0% {-webkit-transform: translateX(1000px);}
    30% {-webkit-transform: translateX(1000px);}       
    50%,100% {-webkit-transform: translateX(0px);}
  }   
}
</style>
</head>
<body style="margin:0px; padding:0px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
  <td align="center">
  <table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="main-table">
    <tr>
    <td>
      <table align="left" border="0" cellpadding="10" cellspacing="0"><tr>
        <td>
          <a href="http://www.freshinbox.com/"><img id="logo" border="0" height="35" src="http://freshinbox.com/examples/hamburger-menu/images/fi-logo-large.jpg"></a>
        </td>
      </tr></table>
    </td></tr>
    <tr><td>
      <div id="navcontainer">
        <!--[if !mso 9]><!-->
        <label for="navcheckbox">
        <div class="nav-under" style="display:none;overflow:hidden;max-height:0px;background-color:#3b5369;"><img src="http://freshinbox.com/examples/hamburger-menu/images/hamburger.png" width="30" height="30" alt="Show Menu" border="0"></div>
        <div class="nav-over" style="display:none;overflow:hidden;max-height:0px;position:absolute;top:0px;width:100%;opacity:0
        "><img src="http://freshinbox.com/examples/hamburger-menu/images/hamburger.png" width="30" height="30" alt="Show Menu" border="0"></div>
        </label>
        <!--<![endif]-->
        <div id="menucontainer">
        <!--[if !mso 9]><!--><input id="navcheckbox" type="checkbox" style="display:none !important;"><!--<![endif]-->
        <table cellspacing="0" cellpadding="0" border="0" width="100%" bgcolor="#3b5369" style="width:100% !important">
            <tr>
            <th height="25" align="center" valign="center"><a href="http://freshinbox.com/blog" target="_blank" style="font-size:15px;font-family:arial,sans-serif;color:#ffffff;font-weight:bold;text-decoration:none;">Blog</a></th>
            <th height="25" align="center"><a href="http://freshinbox.com/blog/category/interactive-email-tutorial/" target="_blank" style="font-size:15px;font-family:arial,sans-serif;color:#ffffff;font-weight:bold;text-decoration:none;">Interactive Email</a></th>
            <th height="25" align="center"><a href="http://freshinbox.com/resources/" target="_blank" style="font-size:15px;font-family:arial,sans-serif;color:#ffffff;font-weight:bold;text-decoration:none;">Resources</a></th>            
            <th height="25" align="center"><a href="http://freshinbox.com/blog/about/" target="_blank" style="font-size:15px;font-family:arial,sans-serif;color:#ffffff;font-weight:bold;text-decoration:none;">About</a></th>
            </tr>
        </table>
        </div>
      </div>
      <div class="effects">
      <table width="100%" border=0 cellpadding=20 cellspacing=0><tr><td bgcolor="#404040" align=center>
      <table width="100%"><tr><td style="font-family: Helvetica, sans-serif; font-size:23px;text-align:center;color:#ffffff; text-shadow: 2px 2px #111111;height:30px;"><div class="intro1">Introducing</div></td></tr></table><BR>
      <table width="100%"><tr><td style="font-family: Helvetica, sans-serif; font-size:27px;text-align:center;color:#ffffff;font-weight:bold; text-shadow: 2px 2px #111111;height:30px;"><div class="intro2">CSS Animation</div></td></tr></table><BR>
      <table width="100%"><tr><td style="font-family: Arial, sans-serif; font-size:32px;font-weight:bold;text-align:center;color:#ffffff; text-shadow: 2px 2px #111111;height:30px;"><div class="intropop">Entrance Effects</div></td></tr></table><BR>
      <img class="delorean" width=200 src="http://freshinbox.com/images/ext/delorean2.png">
      <BR><BR>
      <table width="100%"><tr><td style="font-family: Arial, sans-serif; font-size:17px;font-weight:bold;text-align:center;position:relative;height:20px;color:#ffffff; text-shadow: 2px 2px #111111;"><div class="fallback">Effects only seen in Webkit based clients :(</div></td></tr></table>
      </td></tr></table>
      </div>


      <center>
      <table class="mobi-btn" style="font-family: 'Helvetica Neue', Helvetica; margin: 0; padding: 0; width: 500">
        <tr>
          <td class="padding" style="font-family: 'Helvetica Neue', Helvetica; margin: 0; padding: 10px 0">
            <p style="font-family: 'Helvetica Neue', Helvetica; font-size: 14px; font-weight: normal; margin: 0 0 10px; padding: 0"><a href="http://freshinbox.com/blog/css-animation-entrance-effects-in-email/?utm=example" class="btn-primary" style="background: #348eda; border-color: #348eda; border-radius: 25px; border-style: solid; border-width: 10px 20px; color: #FFF; cursor: pointer; display: inline-block; font-family: 'Helvetica Neue', Helvetica; font-weight: bold; line-height: 2; margin: 0 10px 0 0; padding: 0; text-align: center; text-decoration: none">Read the article</a></p>
          </td>
        </tr>
      </table>
      </center>
      </td>
      </tr>
  </table>
  </td>
  </tr>
</table>
</body>
</html>


              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console