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

              
                <div class="tabbedPanels">
  <ul class="tabs">
    <li><a href="#panel1" class = "tabOne">About</a></li>
    <li><a href="#panel2" class = "tabTwo inactive">Details</a></li>
    <li><a href="#panel3" class = "tabThree inactive">Contact Us</a></li>
  </ul>
  <div class="panelContainer">
    <div class="panel" id="panel1">
      <h1 class = "panelContent">About</h1>
      <p class = "panelContent"><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea illum magni error enim labore facere dolore obcaecati voluptate inventore nemo. Dolorum ipsam fuga nesciunt eos incidunt eum beatae quisquam enim.</span><span>Veniam velit quibusdam pariatur et autem veritatis nesciunt minima! Voluptas impedit voluptates amet dolores debitis labore asperiores quis libero est magnam voluptatum alias praesentium magni deserunt beatae optio quam itaque!</span></p>
      
    </div>
        <div class="panel" id="panel2">
      <h1 class = "panelContent">Details</h1>
      <p class = "panelContent"><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea illum magni error enim labore facere dolore obcaecati voluptate inventore nemo. Dolorum ipsam fuga nesciunt eos incidunt eum beatae quisquam enim.</span><span>Veniam velit quibusdam pariatur et autem veritatis nesciunt minima! Voluptas impedit voluptates amet dolores debitis labore asperiores quis libero est magnam voluptatum alias praesentium magni deserunt beatae optio quam itaque!</span></p>
                <p class = "panelContent"><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea illum magni error enim labore facere dolore obcaecati voluptate inventore nemo. Dolorum ipsam fuga nesciunt eos incidunt eum beatae quisquam enim.</span><span>Veniam velit quibusdam pariatur et autem veritatis nesciunt minima! Voluptas impedit voluptates amet dolores debitis labore asperiores quis libero est magnam voluptatum alias praesentium magni deserunt beatae optio quam itaque!</span></p>
    </div>
        <div class="panel" id="panel2">
      <h1 class = "panelContent">Details</h1>
      <p class = "panelContent"><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea illum magni error enim labore facere dolore obcaecati voluptate inventore nemo. Dolorum ipsam fuga nesciunt eos incidunt eum beatae quisquam enim.</span><span>Veniam velit quibusdam pariatur et autem veritatis nesciunt minima! Voluptas impedit voluptates amet dolores debitis labore asperiores quis libero est magnam voluptatum alias praesentium magni deserunt beatae optio quam itaque!</span></p>
    </div>
      <div class="panel" id="panel3">
      <h1 class = "panelContent">Contact Us</h1>
      <p class = "panelContent"><span>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ea illum magni error enim labore facere dolore obcaecati voluptate inventore nemo. Dolorum ipsam fuga nesciunt eos incidunt eum beatae quisquam enim.</span><span>Veniam velit quibusdam pariatur et autem veritatis nesciunt minima! Voluptas impedit voluptates amet dolores debitis labore asperiores quis libero est magnam voluptatum alias praesentium magni deserunt beatae optio quam itaque!</span></p>
    </div>
  </div>
</div>
              
            
!

CSS

              
                $main-blue : darken(#58A3CC,5%);
$light-blue: darken($main-blue, 18%);
$dark-blue: darken($main-blue, 28%);

.tabbedPanels{
  width: 75%;
  margin:10px auto; 
  @media only screen and (max-width:700px) {
  width: 90%;
  }

}
.tabs{
  margin:0;
  padding:0;
}
.tabs li {
  list-style-type: none;
  float:left;
  text-align: center;
}
.inactive{
  position: relative;
  top:0;


}
.tabs a {
  display:block;
  text-decoration: none;
  padding: 10px 15px;
  box-sixing:border-box;
  width:8rem;
  color:black;
  border-radius: 10px 10px 0 0;
  font-family: 'Raleway';
  font-weight:700;
  font-size: 1.2rem;
  color:white;
  letter-spacing:2px;
  @media only screen and (max-width:700px) {
    width:8rem;
    padding:10px 12px;
    @media only screen and (max-width:500px) {
      letter-spacing:0;
      width: 7rem;
 
    }
  }
}

.tabs a.active {
  border-radius: 10px 10px 0 0;
  position:relative;
  top:1px;
  z-index:100;
}
.tabOne {
  background-color: $main-blue;
}
.tabTwo {
  background-color: $light-blue;

}
.tabThree {
  background-color: $dark-blue;

}
.panel {
  width: 85%;
  margin:1rem auto;
  background-color: white;
  border-radius:20px;
  padding: 20px;
}


.panelContainer {
  clear:left;
  padding:20px;
  background-color: $main-blue;
  border-radius: 0 20px 20px 20px;
}

.panelContent {
  line-height:1.5;
  font-family: Raleway;
  padding: 0 1rem;
  font-size: 1.2rem;
}
h1.panelContent {
  font-size: 2.2rem;
}
   @media only screen and (max-width:700px) {
	  html{
      font-size: 14px;
      @media only screen and (max-width:450px) {
        font-size: 12px;
      }
    }
     
  }



              
            
!

JS

              
                
  $('.tabs a').click(function(){
  $this = $(this);
 

  $('.panel').hide();
  $('.tabs').removeClass('active').addClass('inactive');
  $this.addClass('active').blur();
  
  var panelContainerColor = $this.css('background-color');

  $('.panelContainer').css({backgroundColor: panelContainerColor});
  
  var panel = $this.attr('href');
  
  $(panel).fadeIn(350);
  
  return false;
 
});//end click

 

$('.tabs li:first a').click();




              
            
!
999px

Console