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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <div class="wrapper">
  <ul class="tabs group">
    <li>
      <a class="tabOne switch activeTab" href="#">First Tab</a>
    </li>
    <li>
      <a class="tabTwo switch" href="#">Second Tab</a>
    </li>
    <li>
      <a class="tabThree switch" href="#">Third Tab</a>
    </li>
    <li>
      <a class="tabFour switch" href="#">Fourth Tab</a>
    </li>
    <li>
      <a href="#" class="tabFive switch">Fifth Tab</a>
    </li>
  </ul>
  <div class="content">
    <p id="tabOne">This is the content in the first tab.</p>
    <p id="tabTwo">This is the content in the second tab.</p>
    <p id="tabThree">This is the content in the third tab.</p>
    <p id="tabFour">This is the content in the fourth tab.</p>
    <p id="tabFive">This is the content in the fifth tab.</p>
  </div>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=PT+Sans);

body {
  overflow-y: scroll;
  background: #eee;
  font-family: 'PT Sans', sans-serif;
}
.wrapper {
  margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  width: 100%;
  color: #444;
  background: #222;
  text-align: center;
  border-radius: 6px;
}

ul.tabs {
  width: 803px;
  height: 80px;
  margin: 0 auto;
  list-style: none;
  overflow: hidden;
  padding: 0;
}
ul.tabs li {
  float: left;
  width: 160px;
}
ul.tabs li a {
  position: relative;
  display: block;
  height: 30px;
  margin-top: 40px;
  padding: 10px 0 0 0;
  font-size: 18px;
  text-align: center;
  text-decoration: none;
  color: #444;
  background: #f2d187;
  -webkit-box-shadow: 8px 12px 25px 2px rgba(0,0,0,0.4);
  -moz-box-shadow: 8px 12px 25px 2px rgba(0,0,0,0.4);
  -box-shadow: 8px 12px 25px 2px rgba(0,0,0,0.4);
  border: 0px solid #000;
  -webkit-transition: padding 0.2s ease, margin 0.2s ease;
  -moz-transition: padding 0.2s ease, margin 0.2s ease;
  -ms-transition: padding 0.2s ease, margin 0.2s ease;
  -o-transition: padding 0.2s ease, margin 0.2s ease;
  transition: padding 0.2s ease, margin 0.2s ease;
}

.tabs li:first-child a {
	z-index: 5
  -webkit-border-top-left-radius: 8px;
  -moz-border-radius-topleft: 8px;
  border-top-left-radius: 8px; 
}
.tabs li:nth-child(2) a { z-index: 4; }
.tabs li:nth-child(3) a { z-index: 3; }
.tabs li:nth-child(4) a { z-index: 2; }
.tabs li:last-child a {
  z-index: 1;
  -webkit-box-shadow: 2px 8px 25px -2px rgba(0,0,0,0.3);
	-moz-box-shadow: 2px 8px 25px -2px rgba(0,0,0,0.3);
	box-shadow: 2px 8px 25px -2px rgba(0,0,0,0.3);
  -webkit-border-top-right-radius: 8px;
  -moz-border-radius-topright: 8px;
  border-top-right-radius: 8px;
}
ul.tabs li a:hover {
	margin: 35px 0 0 0;
	padding: 10px 0 5px 0;
}
ul.tabs li a.activeTab {
  margin: 30px 0 0 0;
  padding: 10px 0 10px 0;
  color: #444;
  background: #f2d187;
  border-top: 2px solid #72655F;
  border-right: 2px solid #72655F;
  border-left: 2px solid #72655F;
  z-index: 6;
  outline: none;
}
.content {
  width: 800px;
  height: 400px;
  margin: 0 auto;
  background: #f2d187;
  -webkit-box-shadow: 2px 8px 25px -2px rgba(0,0,0,0.3);
  -moz-box-shadow: 2px 8px 25px -2px rgba(0,0,0,0.3);
  box-shadow: 2px 8px 25px -2px rgba(0,0,0,0.3);
  -webkit-border-bottom-right-radius: 8px;
  -webkit-border-bottom-left-radius: 8px;
  -moz-border-radius-bottomright: 8px;
  -moz-border-radius-bottomleft: 8px;
  border-bottom-right-radius: 8px;
  border-bottom-left-radius: 8px;  
  border-bottom: 2px solid #72655F;
  border-right: 2px solid #72655F;
  border-left: 2px solid #72655F;
}

p {
  font-family: 'PT Sans', sans-serif;
  padding: 30px 40px;
  color: #72655F;
  line-height: 26px;
  font-size: 18px;
  margin: 0;
}

#tabTwo, #tabThree, #tabFour, #tabFive { display: none; }
.group:before,
.group:after {
    content: " ";
    display: table;
}
.group:after {
    clear: both;
}
              
            
!

JS

              
                $('.tabOne').click(function() {
	    $('a.switch').removeClass("activeTab");
	   	$(this).addClass("activeTab");
      $("#tabOne").show();
      $("#tabTwo").hide();
      $("#tabThree").hide();
      $("#tabFour").hide();
      $("#tabFive").hide();
      event.preventDefault();
	});
  
$('.tabTwo').click(function() {
	    $('a.switch').removeClass("activeTab");
	   	$(this).addClass("activeTab");
      $("#tabOne").hide();
      $("#tabTwo").show()
      $("#tabThree").hide();
      $("#tabFour").hide();
      $("#tabFive").hide();
      event.preventDefault();
	});
  
$('.tabThree').click(function() {
	    $('a.switch').removeClass("activeTab");
	   	$(this).addClass("activeTab");
      $("#tabOne").hide();
      $("#tabTwo").hide();
      $("#tabThree").show();
      $("#tabFour").hide();
      $("#tabFive").hide();
      event.preventDefault();
	});
  
$('.tabFour').click(function() {
	    $('a.switch').removeClass("activeTab");
	   	$(this).addClass("activeTab");
      $("#tabOne").hide();
      $("#tabTwo").hide();
      $("#tabThree").hide();
      $("#tabFour").show();
      $("#tabFive").hide();
      event.preventDefault();
	});

$('.tabFive').click(function() {
  $('a.switch').removeClass("activeTab");
  $(this).addClass("activeTab");
  $("#tabOne").hide();
  $("#tabTwo").hide();
  $("#tabThree").hide();
  $("#tabFour").hide();
  $("#tabFive").show();
  event.preventDefault();
});
              
            
!
999px

Console