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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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

HTML

              
                <div class="container">
        <a href="#tab1" class="tab current">
            <h3>Tab 1</h3>
        </a>
        <a href="#tab2" class="tab">
            <h3>Tab 2</h3> 
        </a>
        <a href="#tab3" class="tab">
            <h3>Tab 3</h3>
        </a>
        <a href="#tab4" class="tab">
            <h3>Tab 4</h3>
        </a>
        <a href="#tab5" class="tab">
            <h3>Tab 5</h3> 
        </a>
        <div class="tab-content current" id="tab1">
            <h2>Content 1</h2>
            <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Id iure pariatur sapiente exercitationem cupiditate suscipit labore adipisci maxime quo dolore. Assumenda laborum pariatur incidunt fuga quibusdam accusamus. Voluptatum, accusamus, doloremque.</p>
        </div>
        <div class="tab-content" id="tab2">
            <h2>Content 2</h2>
            <p>Laborum quae eveniet, architecto atque quis provident eaque natus est facilis, quaerat molestiae obcaecati, illo placeat labore explicabo ab odio nostrum voluptatem repudiandae officia voluptatum optio fugiat sunt nesciunt! In.</p>
        </div>
        <div class="tab-content" id="tab3">
            <h2>Content 3</h2>
            <p>Sit eos sed minima maiores nisi! Delectus harum ratione hic esse? Obcaecati ducimus at totam debitis, neque in recusandae! Quis maiores perspiciatis repellat minima fugiat impedit consequuntur, omnis veritatis illo.</p>
        </div>
        <div class="tab-content" id="tab4">
            <h2>Content 4</h2>
            <p>Quod esse totam similique quo culpa perspiciatis beatae dignissimos vel distinctio laudantium autem, doloremque officia, voluptates est rerum. Ducimus dolor ad sit, eius quod distinctio cum omnis molestias aut quaerat!</p>
        </div>
        <div class="tab-content" id="tab5">
            <h2>Content 5</h2>
            <p>Suscipit a illo quo excepturi ut tempore similique amet quisquam illum, pariatur eligendi voluptatem, vitae reiciendis autem, veritatis animi aperiam quae reprehenderit magnam! Asperiores consequatur, ad eos animi nesciunt tenetur.</p>
        </div>
    </div>
              
            
!

CSS

              
                * {
    box-sizing: border-box;
}
body {
    width: 90%;
    margin: 20px auto;
    font-family: 'Montserrat', sans-serif;
}
.tabs {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
}
.container {
    height: 200px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
}
.tab-content {
    width: 100%;
    display: none;
    border: 1px solid #0f0;
    padding: 15px;
}
.tab-content.current {
    display: block;
}
.tab {
    color: inherit;
    text-decoration: none;
    margin-right: 3px;
}
.tab h3 {
    border: 1px solid #ccc;
    border-top-width: 5px;
    border-bottom: 0;
    padding: 10px 15px;
    margin: 0;
    background-color: #fff;
}
.tab.current h3 {
    border-color: #0f0;
    position: relative;
    top: 1px;
}
@media (max-width: 480px) {
    .container {
        -webkit-flex-direction: column;
        -ms-flex-direction: column;
        flex-direction: column;
        height: auto;
    }
    .tab {
        width: 100%;
        margin-right: 0;
    }
    .tab:first-child {
        order: 1
    }
    #tab1 {
        order: 2;
    }
    .tab:nth-child(2) {
        order: 3
    }
    #tab2 {
        order: 4;
    }
    .tab:nth-child(3) {
        order: 5
    }
    #tab3 {
        order: 6;
    }
    .tab:nth-child(4) {
        order: 7
    }
    #tab4 {
        order: 8;
    }
    .tab:nth-child(5) {
        order: 9
    }
    #tab5 {
        order: 10;
    }
}
              
            
!

JS

              
                $('.tab').click(function() {
                $('.tab.current').removeClass('current');
 $(this).addClass('current');
 $('.tab-content.current').removeClass('current');
 $('.container').find($(this).attr('href')).addClass('current');
 
 });
              
            
!
999px

Console