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

              
                <!-- Credit: http://jurassicpark.wikia.com/wiki/Jurassic_Park_Wiki -->
<div class="container">
    <h1>The Raptor Squad</h1>
    <div class="tabpanel">
        <input type="radio" name="tab" id="tabpanel__tab-1" class="tabpanel__tab" checked="checked"/>
        <label for="tabpanel__tab-1" class="tabpanel__tablabel">Owen</label>
        <input type="radio" name="tab" id="tabpanel__tab-2" class="tabpanel__tab" />
        <label for="tabpanel__tab-2" class="tabpanel__tablabel">Blue</label>
        <input type="radio" name="tab" id="tabpanel__tab-3" class="tabpanel__tab" />
        <label for="tabpanel__tab-3" class="tabpanel__tablabel">Charlie</label>
        <input type="radio" name="tab" id="tabpanel__tab-4" class="tabpanel__tab" />
        <label for="tabpanel__tab-4" class="tabpanel__tablabel">Delta</label>
        <input type="radio" name="tab" id="tabpanel__tab-5" class="tabpanel__tab" />
        <label for="tabpanel__tab-5" class="tabpanel__tablabel">Echo</label>

        <div class="tabpanel__panels">
            <div class="tabpanel__panel" id="tabpanel__panel-1">
                <div class="media">
                    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13060/owen.png" alt="Owen Grady" class="media__img" />
                    <div class="media__body">
                        <h2>Early life</h2>
                        <p>Prior to his occupation in Jurassic World, Owen was a member of the U.S. Navy. During his time in the Navy he trained dolphins (presumably under the United States Navy Marine Mammal Program) and had been in combat before.</p>
                        <h2>IBRIS Project</h2>
                        <p>After getting out of the Navy, Owen Grady was hired by the InGen Security Division to train and research the behaviors of Velociraptor. Many raptors died over the course of the project from either failed training techniques or fighting among themselves.</p>
                        <p>In 2013, after discovering that the pack dynamic of Velociraptor was more complex than previously thought, he recommended his old friend Barry to Vic Hoskins to help in the training of the raptors.[5] Barry was eventually hired as trainer and caretaker of the raptors.</p>
                        <p>By 2015, he was the alpha of a Velociraptor pack which consisted of Blue, Charlie, Delta, and Echo. As he worked for Jurassic World, he lived in a Sunrio bungalow in the outskirts of the park.</p>
                    </div>
                </div>
                
            </div>
            <div class="tabpanel__panel" id="tabpanel__panel-2">
                <div class="media">
                    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13060/blue.png" alt="Blue" class="media__img" />
                    <div class="media__body">
                        <h2>Creation</h2>
                        <p>Blue was created by InGen for the IBRIS Project sometime before 2015 and was the first Velociraptor to be created for the latest pack. She was created with the DNA of the Black-throated monitor lizard, which allowed her scales to reflect an iridescent blue color, giving her the distinctive pattern that she was named after. Out of all the raptors that were to be created following her birth, she was the largest. When she was born, Owen Grady imprinted on her, which allowed him to train her. During her youth, she and Echo engaged in a fight for dominance over the park's Velociraptor pack, of which Blue was the victor.</p>
                    </div>
                </div>                
            </div>
            <div class="tabpanel__panel" id="tabpanel__panel-3">
                <div class="media">
                    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13060/charlie.png" alt="Charlie" class="media__img" />           
                    <div class="media__body">
                        <h2>Creation</h2>
                        <p>Charlie was created by InGen as an attraction for the IBRIS Project. She is the youngest of the park's Velociraptor pack consisting of Blue, Delta, and Echo. Her skin pattern is the result of using Green Iguana DNA in his genetic coding. In her birth, Owen Grady imprinted on her and trained her along with her siblings.</p>
                    </div>
                </div>
            </div>
            <div class="tabpanel__panel" id="tabpanel__panel-4">
                <div class="media">
                    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13060/delta.png" alt="Delta" class="media__img" />
                    <div class="media__body">
                        <h2>Creation</h2>
                        <p>Delta was the second Velociraptor to be created by InGen for the IBRIS Project. She was created using more avian DNA, resulting in more birdlike movements and actions.She belonged to a pack consisting of Blue, Charlie, and Echo. She and her pack were trained by Owen Grady, who imprinted on them in their birth. It is assumed Delta was the second in command of the pack because of her age.</p>
                    </div>
                </div>
            </div>
            <div class="tabpanel__panel" id="tabpanel__panel-5">
                <div class="media">
                    <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/13060/echo.png" alt="Echo" class="media__img" />
                    <div class="media__body">
                        <h2>Creation</h2>
                        <p>Echo was created by InGen for the IBRIS Project where she was the third Velociraptor created for the facility. When she was born, Owen Grady imprinted on her, which allowed him to train her. In her youth, she battled Blue for control of the park's Velociraptor pack, but Blue was the victor. Echo gained a scar across her face from the encounter and her jaw became permanently offset. Due to her permanent sneer, some of the Jurassic World dinosaur handlers nicknamed her "Elvis".</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
              
            
!

CSS

              
                // Credit: http://www.redbubble.com/people/crowmonster/works/15404869-owens-raptor-squad?grid_pos=4&p=sticker

@import "breakpoint";
@import "susy";

@mixin breakpoint($point) {
	@if $point == big {
		@media screen and (min-width: 601px){@content;}
	}	
	@else if $point == small {
		@media screen and (max-width: 600px){@content;}
	}
}

// ===========================================
// Base
// ===========================================

*,
*:before,
*:after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    line-height: 1.5;
    text-size-adjust: 100%;
    font-family: 'Raleway', sans-serif;
}

body {
    background: #c5d5cb;
}

.container {
    box-sizing: content-box;
    max-width: 60em; // 960px
    margin: 0 auto 48px auto;  
    padding: 12px;
}

.tabpanel__tab {
    position: absolute; 
    left: -10000px; 
    top: auto; 
    width: 1px; 
    height: 1px; 
    overflow: hidden;
    
	&:checked{
		+ .tabpanel__tablabel {
			background: #e3e0cf;
            color: black;
		}
	}
}
    
.tabpanel__tablabel {
    flex: 0 1 auto;
    padding: 12px;
    background: #9fa8a3;
    color: white;
    font-weight: 700;
    
    &:hover {
        cursor: pointer;
    }
}

.tabpanel__panel {
    display: none;
    background: #e3e0cf;    
    
    > * {
        &:first-child {
            margin-top: 0;    
        }
        
        &:last-child {
            margin-bottom: 0;    
        }
    }
    
    > * + * {
        margin-top: 24px;
    }
}

#tabpanel__tab-1:checked ~ .tabpanel__panels #tabpanel__panel-1,
#tabpanel__tab-2:checked ~ .tabpanel__panels #tabpanel__panel-2,
#tabpanel__tab-3:checked ~ .tabpanel__panels #tabpanel__panel-3,
#tabpanel__tab-4:checked ~ .tabpanel__panels #tabpanel__panel-4,
#tabpanel__tab-5:checked ~ .tabpanel__panels #tabpanel__panel-5 {
    display: block;
    position: relative;
	top: 0px;
}

.media__body {
    > * {
        margin: 0;    
    }
    
    > p + p,
    > p + h2 {
        margin-top: 24px;
    }
}

.media {
    display: flex;
    
    @include breakpoint(small) {
        flex-direction: column;
        align-items: flex-start;
        
        .media__img {
            margin: 0 auto;
            
            + .media__body {
                margin: 12px 24px 24px 24px;
            }
        }
    }
    
    @include breakpoint(big) {
        align-items: flex-start;
        
        .media__img {
            flex: 0 1 auto;
            height: auto;
            
            + .media__body {
                margin: 24px 105px 24px 18px;
            }
        }
    }
}

.tabpanel {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    
    @include breakpoint(small) {
        flex-direction: column;
        
        .tabpanel__tablabel {
            padding: 24px 36px;
            
            + .tabpanel__tab {
                + .tabpanel__tablabel {
                    margin-top: 6px;
                }
            }
        }
        
        .tabpanel__tab {            
            &:checked {
                ~ .tabpanel__panels {
                    order: 1;
                }
            }
            
            &:not(:checked) {
                + .tabpanel__tablabel {
                    order: initial;
                }
            }
        }
        
        #tabpanel__tab-1 {
            + .tabpanel__tablabel {
                order: 1;
            }
            
            &:checked {
                ~ .tabpanel__panels {
                    order: 1;
                }
            }
        }
        
        #tabpanel__tab-2 {
            + .tabpanel__tablabel {
                order: 2;
            }
            
            &:checked {
                ~ .tabpanel__panels {
                    order: 2;
                }
            }
        }
        
        #tabpanel__tab-3 {
            + .tabpanel__tablabel {
                order: 3;
            }
            
            &:checked {
                ~ .tabpanel__panels {
                    order: 3;
                }
            }
        }
        
        #tabpanel__tab-4 {
            + .tabpanel__tablabel {
                order: 4;
            }
            
            &:checked {
                ~ .tabpanel__panels {
                    order: 4;
                }
            }
        }
        
        #tabpanel__tab-5 {
            + .tabpanel__tablabel {
                order: 5;
            }
            
            &:checked {
                ~ .tabpanel__panels {
                    order: 5;
                }
            }
        }
        
        .tabpanel__panel {
            padding: 0 12px 12px 12px;
        }
    }
    
    @include breakpoint(big) {
        flex-direction: row;
        
        .tabpanel__tablabel {
            flex: 0 1 auto;
            padding-left: 24px;
            padding-right: 24px;
            
            + .tabpanel__tab {
                + .tabpanel__tablabel {
                    margin-left: 6px;
                }
            }
        }
        
        .tabpanel__panel {
            padding: 12px;
        }
        
        .tabpanel__panels {
            flex: 1 1 100%;
        }
    }
}
              
            
!

JS

              
                
              
            
!
999px

Console