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">
  <div id="modal-1">
    <div class="box-menu">
      <ul>
        <li class="active"><a href="#start"><i class="fa fa-home" aria-hidden="true"></i> Start</a></li>
        <li><a href="#about"><i class="fa fa-info" aria-hidden="true"></i> About</a></li>
        <li><a href="#settings"><i class="fa fa-cog" aria-hidden="true"></i> Settings</a></li>
        <li><a href="#close" id="close"><i class="fa fa-sign-out" aria-hidden="true"></i> Logout</a></li>
      </ul>
    </div>
    <div class="tab-content">
      <div class="box" id="start">
        <h2>Hello there</h2>
        <img class="grow" src="http://i.giphy.com/fSPV4dio5ioRa.gif" alt="" />
        <p>I'm just a cute little box with a menu. I'm also fully responsive. Use it as you wish!</p>
      </div>
      <div class="box" id="about">
        <h2>What we do</h2>
        <p class="ingres">Turducken kevin drumstick pork chop, turkey flank fatback andouille. Prosciutto kevin strip steak rump short ribs. Ham pork belly turducken swine kielbasa short ribs beef tri-tip hamburger ribeye. Meatball landjaeger short loin, shankle leberkas
          brisket shoulder bacon picanha pork belly. Jowl jerky boudin bacon short ribs biltong, tenderloin flank kevin cow. Tenderloin pork pancetta, salami ribeye pork loin leberkas spare ribs. Ribeye swine filet mignon, cow biltong tenderloin sausage.</p>

        <p>Leberkas alcatra t-bone boudin jowl brisket tongue frankfurter shank. Venison filet mignon cow tri-tip tail doner boudin bacon ball tip shank turducken fatback prosciutto. Swine drumstick jerky, ham hock tenderloin shank sausage.</p>
      </div>
      <div class="box" id="settings">
        <h2>Settings</h2>
        <form>
          <input type="email" placeholder="Email" />
          <input type="password" placeholder="New Password" />
          <input type="password" placeholder="Confirm Password" />
          <button class="submit">Save</button>
        </form>
      </div>
    </div>
  </div>
</div>

<a href="#" class="openit"><i class="fa fa-sign-in" aria-hidden="true"></i> Login</a>
            
          
!
            
              body {
  background: #232526;
  background: -webkit-linear-gradient(to left, #182530, #46466d);
  background: linear-gradient(to left, #182530, #46466d);
  font-family: Helvetica, Arial, sans-serif;
  color: #424249;
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 1);
  -webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: antialiased;
}

h2 {
  color: #4d4db5;
  margin: 30px 0;
}

p {
  color: #424249;
  line-height: 24px;
}

p.ingres {
  font-weight: bold;
}

ul,
li {
  margin: 0;
  padding: 0;
}

a i {
  margin-right: 7px;
}

.container {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 20px;
}

#modal-1 {}

.box-menu {
  background: #fff;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  text-align: center;
  position: static;
  display: table;
  width: 100%;
}

.box-menu ul {
  list-style: none;
  width: 100%;
}

.box-menu ul li {
  padding: 0;
  float: left;
  width: 25%;
  box-shadow: 1px 0px 0px rgba(0, 0, 0, 0.15);
  border-bottom: 3px solid #333360;
  transition: all 0.2s ease-in-out;
}

.box-menu ul li:last-child {
  box-shadow: none;
}

.box-menu ul li.active {
  box-shadow: 0px 5px 30px rgba(0, 0, 0, 0.25);
  border-bottom: 3px solid #4d4db5;
}

.box-menu ul li a {
  padding: 20px 0 18px;
  height: 20px;
  display: block;
  color: #232526;
  text-decoration: none;
}

.box-menu ul li a:hover {
  color: #646a6d;
}

.box-menu ul li a:active {
  color: #4d4db5;
}

.box-menu ul li.active a,
.box-menu ul li.active a:hover {
  color: #4d4db5;
}

.box-menu ul li:last-child {
  border-right: none;
}

@media(max-width:460px) {
  .box-menu ul li i {
    display: none;
  }
}

.box {
  background: #fff;
  padding: 8px 20px;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
  box-shadow: 0 3rem 5rem -2rem rgba(0, 0, 0, 0.8);
  text-align: center;
}

.box img {
  width: 100%;
}

.box img.grow {
  width: 105.3%;
  margin: 0 -20px 0 -20px;
}

@media(max-width:800px) {
  .box img.grow {
    width: 100%;
    margin: 0;
  }
}

.box form {
  width: 100%;
  margin-bottom: 15px;
}

.box form input {
  width: 100%;
  padding: 10px 8px;
  box-sizing: border-box;
  margin-bottom: 15px;
}

.box form input:focus {
  outline: none;
  box-shadow: 0px 3px 5px rgba(0,0,0,0.2);
  border: 2px solid #4d4db5;
}

.box form button {
  width: 100%;
  padding: 10px 8px;
  box-sizing: border-box;
  cursor: pointer;
}

.box#about,
.box#settings {
  display: none;
}

.openit {
  position: absolute;
  left: 50%;
  margin-left: -60px;
  top: 110px;
  background: #fff;
  padding: 15px;
  text-decoration: none;
  color: #4d4db5;
  border-radius: 3px;
  box-shadow: 0px 30px 30px rgba(0, 0, 0, 0.2);
  display: none;
}

.outAnimation {
  transition: all 1s ease;
  transform: translateY(-1000px) scale(0.1);
  opacity: 0;
}

.inAnimation {
  transition: all 1s ease;
  transform: translateY(0px) scale(1);
  opacity: 1;
}
            
          
!
            
              jQuery(document).ready(function() {

  jQuery('.box-menu a').on('click', function(e) {
    var currentAttrValue = jQuery(this).attr('href');

    jQuery('.tab-content ' + currentAttrValue).slideDown(400).siblings().slideUp(400);
    jQuery(this).parent('li').addClass('active').siblings().removeClass('active');

    e.preventDefault();
  });

  jQuery('#close').click(function(o) {
    jQuery('#modal-1').addClass('outAnimation');
    jQuery('#modal-1').removeClass('inAnimation');
    jQuery('.box-menu ul li:nth(3)').removeClass('active');
    jQuery('.openit').delay(500).fadeIn();
  });

  jQuery('.openit').click(function(i) {
    jQuery('#modal-1').addClass('inAnimation');
    jQuery('#modal-1').removeClass('outAnimation');
    jQuery('.box-menu ul li:first-child').addClass('active');
    jQuery('.box').hide();
    jQuery('.box#start').show();
    jQuery('.openit').fadeOut(200);
  });
});
            
          
!
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