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="tabs_container cf">
  <div class="tabs product_info cf">
    <ul class="tabs cf">
      <li data-tab="description" class="active">Description</li>
      <li data-tab="delivery">Delivery</li>
      <li data-tab="reviews">Reviews</li>
      <li data-tab="faqs">FAQs</li>
    </ul>
    <div class="text" id="description">
      <p>Tab one.</p>
      <p>Etiam tincidunt, sem facilisis lobortis pharetra, massa nisi fermentum risus, vitae dictum eros ante ac augue. Donec eu erat in felis feugiat laoreet. Sed ornare elit vel ipsum imperdiet, et scelerisque tellus pellentesque.</p>
      <p>Fusce malesuada, nulla sed facilisis molestie, orci odio aliquet tellus, id luctus quam dolor vel mauris. Vivamus at sapien tempor, tincidunt enim vitae, feugiat arcu. Nunc aliquam, mi et facilisis dignissim, libero nibh convallis leo, iaculis pellentesque
        nunc purus sit amet ex.</p>
      <p>Maecenas at nisl in sapien elementum luctus sed quis ante.</p>
    </div>
    <!-- text -->
    <div class="text" id="delivery">
      <p>Tab two.</p>
      <p>Delivery. Etiam tincidunt, sem facilisis lobortis pharetra, massa nisi fermentum risus, vitae dictum eros ante ac augue. Donec eu erat in felis feugiat laoreet. Sed ornare elit vel ipsum imperdiet, et scelerisque tellus pellentesque.</p>
      <p>Fusce malesuada, nulla sed facilisis molestie, orci odio aliquet tellus, id luctus quam dolor vel mauris. Vivamus at sapien tempor, tincidunt enim vitae, feugiat arcu. Nunc aliquam, mi et facilisis dignissim, libero nibh convallis leo, iaculis pellentesque
        nunc purus sit amet ex.</p>
      <p>Description. Etiam tincidunt, sem facilisis lobortis pharetra, massa nisi fermentum risus, vitae dictum eros ante ac augue. Donec eu erat in felis feugiat laoreet. Sed ornare elit vel ipsum imperdiet, et scelerisque tellus pellentesque.</p>
      <p>Fusce malesuada, nulla sed facilisis molestie, orci odio aliquet tellus, id luctus quam dolor vel mauris. Vivamus at sapien tempor, tincidunt enim vitae, feugiat arcu. Nunc aliquam, mi et facilisis dignissim, libero nibh convallis leo, iaculis pellentesque
        nunc purus sit amet ex.</p>
    </div>
    <!-- text -->
    <div class="text" id="reviews">
      <p>Tab three.</p>
      <p>Reviews. ultrices faucibus vehicula. Etiam tincidunt, sem facilisis lobortis pharetra, massa nisi fermentum risus, vitae dictum eros ante ac augue. Donec eu erat in felis feugiat laoreet. Sed ornare elit vel ipsum imperdiet, et scelerisque tellus
        pellentesque.</p>
      <p>Fusce malesuada, nulla sed facilisis molestie, orci odio aliquet tellus, id luctus quam dolor vel mauris. Vivamus at sapien tempor, tincidunt enim vitae, feugiat arcu. Nunc aliquam, mi et facilisis dignissim, libero nibh convallis leo, iaculis pellentesque
        nunc purus sit amet ex.</p>
      <p>Maecenas at nisl in sapien elementum luctus sed quis ante.</p>
    </div>
    <!-- text -->
    <div class="text" id="faqs">
      <p>Tab four.</p>
      <p>FAQs. Etiam tincidunt, sem facilisis lobortis pharetra, massa nisi fermentum risus, vitae dictum eros ante ac augue. Donec eu erat in felis feugiat laoreet. Sed ornare elit vel ipsum imperdiet, et scelerisque tellus pellentesque.</p>
      <p>Fusce malesuada, nulla sed facilisis molestie, orci odio aliquet tellus, id luctus quam dolor vel mauris. Vivamus at sapien tempor, tincidunt enim vitae, feugiat arcu. Nunc aliquam, mi et facilisis dignissim, libero nibh convallis leo, iaculis pellentesque
        nunc purus sit amet ex.</p>
      <p>Maecenas at nisl in sapien elementum luctus sed quis ante.</p>
    </div>
    <!-- text -->
  </div>
  <!-- product info -->
  </div<!-- product page -->
            
          
!
            
              html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
}
body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  background: #fff;
}
*, *:before, *:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -o-box-sizing: border-box;
  box-sizing: border-box;
}
.cf:before, .cf:after {
  content: " ";
  display: table;
}
.cf:after {
  clear: both;
}

.tabs_container {
  position: relative;
  margin: 60px;
}
.tabs {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 2;
}
.tabs li {
  position: relative;
  float: left;
  color: #7f7d80;
  background: #fff;
  border-right: 5px solid #eaeff7;
  border-top: 5px solid #eaeff7;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  padding: 13px 20px;
  -webkit-transition: 0.3s;
  transition: 0.3s;
  cursor: pointer;
}
.tabs li:first-of-type {
  border-left: 5px solid #eaeff7;
}
.tabs li.active {
  color: #0f0615;
  border-color: #dee4ef;
}
.tabs li:after {
  position: absolute;
  content: '';
  bottom: -5px;
  left: 0;
  display: inline-block;
  width: 100%;
  height: 5px;
  background: #dee4ef;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}
.tabs li:before {
  position: absolute;
  content: '';
  opacity: 0;
  top: -5px;
  left: -5px;
  display: inline-block;
  width: 5px;
  height: calc(100% + 5px);
  background: #eaeff7;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}
.tabs li.active:before {
  background: #dee4ef;
  opacity: 1;
}
.tabs li.active:after {
  background: #fff;
}
.text {
  display: none;
  border: 5px solid #dee4ef;
  margin: 0 0 60px 0;
  padding: 45px;
  position: relative;
  background: #fff;
}
.text p {
  margin: 0 0 25px 0;
  color: #4b454f;
  font-size: 17px;
  line-height: 25px;
  font-weight: 300;
}
.text p:last-of-type {
  margin: 0;
}

@media only screen and (max-width: 600px) {
  .product_info {
    margin: 0;
  }
  .product_info .text {
    padding: 25px;
    margin: 0;
  }
  .product_info .tabs li {
    width: 100%;
    border-color: #dee4ef;
    padding: 15px 25px;
  }
  .product_info .tabs li {
    border-left: 5px solid #dee4ef;
  }
  .product_info .tabs li.active {
    background: #dee4ef;
  }
  .product_info .tabs li:first-of-type {
    border-color: #dee4ef;
  }
  .product_info .tabs li.active:last-of-type:after {
    background: #dee4ef;
  }
}

@media only screen and (max-width: 450px) {
  .product_info .tabs li {
    padding: 15px 20px;
  }
}

            
          
!
            
              $(function() {
  if ($(".tabs_container .tabs").length > 0) {
    var active_tab = $(".product_info .tabs li:first-child").data("tab");
    $("#" + active_tab).show();
    $(".product_info .tabs li:first-child").addClass("active");

    $(".product_info .tabs li").click(function(e) {
      var active_tab = $(this).data("tab");
      $(".product_info .text").hide();
      $("#" + active_tab).show();
      $(".product_info .tabs li").removeClass("active");
      $(this).addClass("active");
    });
  }
});

            
          
!
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