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

              
                <!doctype html>
<html lang="en">
    <head>
        <title>The Horse in Motion</title>
    </head>
    <body>
        <header>
            <h1 class="main-heading">
                <span class="text">The</span> <span class="text">Horse</span> <span class="text">in</span> <span class="text">Motion</span></h1>
        </header>
        <main>
            <figure class="article-figure">
                <div class="article-image">
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-001" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-002" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-003" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-004" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-005" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-006" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-007" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-008" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-009" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-010" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-011" alt="Unsplash Photo" width="360" height="240" /></div>
                    <div class="img-skin"><img src="https://source.unsplash.com/360x240?horse-012" alt="Unsplash Photo" width="360" height="240" /></div>
                </div>
                <figcaption>
                    <div class="caption-paragraph">"<span class="sallie-gardner-text">Sallie Gardner</span>," owned by <span class="leland-standford-text">Leland Stanford</span>; running at a 1.40 gait over the Palo Alto track, 19th June, 1878.</div>
                    <div class="illustrator-credit">Illustrated by <span class="muybridge-text">Muybridge</span></div>
                    <div class="photography-type">Automatic Electro-Photograph</div>
                </figcaption>
            </figure>
            <p class="article-paragraph">The negatives of this photographs were made at intervals of twenty-seven inches of distance, and about the twenty-fifth part of a second of time; they illustrate consecutive positions assumed in each twenty-seven inches of progress during a single stride of the mare. The vertical lines were twenty-seven inches apart; the horizontal lines represent elevations of four inches each. The exposure of each negative was less than the two-thousandth part of a second.</p>
        </main>
        <footer>
            <div class="copyright">Copyright, 1878, by <span class="muybridge-text">Muybridge</span></div>
            <div class="gallery-address"><span class="morse-text">Morse's</span> Gallery, 417 Montgomery St., San Francisco</div>
        </footer>
    </body>
</html>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css?family=Cinzel+Decorative|Cormorant+Garamond:400,600|Lato|Rokkitt:400,600');

.article-image {
    grid-area: a1;
    grid-column: a1/-1;
    padding: .25rem;
    background-color: black;
    
    img {
        display: block;
        max-width: 100%;
        height: auto;
        filter: grayscale(100%);
        border-radius: .0625rem;
        transition: .3s filter ease-in-out;
        
        &:hover {
            filter: grayscale(0%);
        }
    }
}

.img-skin {
    float: left;
    padding: .25rem;
    width: 25%;
}

.copyright {
    grid-area: a2;
    grid-column: a2/b2;
    margin: .25rem 1rem;
    font-family: 'Lato', sans-serif;
    font-size: .75rem;
    
    .muybridge-text {
        text-transform: uppercase;
    }
}

.gallery-address {
    grid-area: d2;
    grid-column: d2/-1;
    margin: .25rem 1rem;
    text-align: right;
    font-family: 'Lato', sans-serif;
    font-size: .75rem;
    
    .morse-text {
        text-transform: uppercase;
    }
}

.main-heading {
    grid-area: a3;
    grid-column: a3/-1;
    margin: 0 0 .5rem;
    text-align: center;
    text-transform:  uppercase;
    font-size: 1.5rem;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: .25em;
    word-spacing: .25em;
    
    .text {
        display: inline-block;
        
        &:first-letter {
            display: block;
            font-family: 'Cinzel Decorative', cursive;
            font-size: 2.5rem;
            font-weight: normal;
        }
    }
}

.illustrator-credit {
    grid-area: a4;
    grid-column: a4/-1;
    align-self: end;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: .75rem;
    
    .muybridge-text {
        display: block;
        font-family: 'Rokkitt', serif;
        text-transform: uppercase;
        font-size: 1rem;
    }
}

.photography-type {
    grid-area: e4;
    align-self: end;
    margin-bottom: .25em;
    text-align: right;
    font-family: 'Rokkitt', serif;
    text-transform: uppercase;
    font-size: .75rem;
    
    @media only screen and ( min-width: 35em ) {
        margin-left: 3rem;
        margin-right: 3rem;
    }
}

.caption-paragraph {
    grid-area: a5;
    grid-column: a5/-1;
    text-align: center;
    font-family: 'Rokkitt', serif;
    font-weight: bold;
    font-size: 1.25rem;
    
    @media only screen and ( min-width: 35em ) {
        margin: 0 3rem;
    }
    
    .sallie-gardner-text {
        text-transform: uppercase;
    }
    
    .leland-standford-text {
        text-transform: uppercase;
    }
}

.article-paragraph {
    grid-area: a6;
    grid-column: a6/-1;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    
    @media only screen and ( min-width: 35em ) {
        margin: 0 3rem;
    }
}

body {
    display: grid;
    grid-template:
        'a1 b1 c1 d1 e1'
        'a2 b2 c2 d2 e2'
        'a3 b3 c3 d3 e3'
        'a4 b4 c4 d4 e4'
        'a5 b5 c5 d5 e5'
        'a6 b6 c6 d6 e6';
    margin: 0;
    padding: 1rem;
    background-color: #D4D4D4;
    line-height: 1.5;
}

header,
main,
figure,
figcaption,
footer {
    display: contents;
}

figure {
    margin: 0;
}

* {
    box-sizing: border-box;
}
              
            
!

JS

              
                
              
            
!
999px

Console