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="card-tiles-container">
        <div class="card-tile blue">
            <div class="text-content">
                <h4>Card Title</h4>
                <p>Inner card content text</p>
            </div>
        </div>
        <div class="card-tile orange">
            <div class="text-content">
                <h4>Card Title</h4>
                <p>Inner card content text</p>
            </div>
        </div>
        <div class="card-tile green">
            <div class="text-content">
                <h4>Card Title</h4>
                <p>Inner card content text</p>
            </div>
        </div>
    </div>
              
            
!

CSS

              
                * {
    box-sizing: border-box;
}

.card-tiles-container {
        display: flex;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
        font-size: 14px;
        margin: 20px 0;
    }

    /* Shared transitions */
    .card-tile,
    .card-tile .text-content {
        transition: .3s ease all;
    }

    /* Default card tile styles */
    .card-tile {
        border: 1px solid;
        border-radius: 10px;
        cursor: pointer;
        height: 150px;
        margin: 0 10px;
        overflow: hidden;
        position: relative;
        width: 33.33%;
    }

    /* Blue Card */
    .card-tile.blue {
        background-color: #0093E9;
        background-image: linear-gradient(0deg, #0093E9 0%, #80D0C7 100%);
        border-color: #0093E9;
        box-shadow: 0 4px 12px rgba(128,208,199,0.7), inset 0 2px 1px rgba(255,255,255,0.6);
    }
    .card-tile.blue:hover {
        box-shadow: 0 8px 18px rgba(128,208,199,0.4), inset 0 2px 1px rgba(255,255,255,0.6);
    }

    /* Orange Card */
    .card-tile.orange {
        background-color: #FAD961;
        background-image: linear-gradient(180deg, #FAD961 0%, #F76B1C 100%);
        border-color: #F76B1C;
        box-shadow: 0 4px 12px rgba(247,107,28,0.7), inset 0 2px 1px rgba(255,255,255,0.6);
    }
    .card-tile.orange:hover {
        box-shadow: 0 8px 18px rgba(247,107,28,0.4), inset 0 2px 1px rgba(255,255,255,0.6);
    }

    /* Green Card */
    .card-tile.green {
        background-color: #096e40;
        background-image: linear-gradient(0deg, #096e40 0%, #2AF598 100%);
        border-color: #096e40;
        box-shadow: 0 4px 12px rgba(9,110,64,0.7), inset 0 2px 1px rgba(255,255,255,0.6);
    }
    .card-tile.green:hover {
        box-shadow: 0 8px 18px rgba(9,110,64,0.4), inset 0 2px 1px rgba(255,255,255,0.6);
    }



    /* Card tile text content */
    .card-tile .text-content {
        background: linear-gradient(rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
        bottom: 10px;
        border: 1px solid rgba(0,0,0,0.4);
        border-radius: 5px;
        box-shadow: inset 0 1px 1px rgba(255,255,255,0.8), 0 2px 4px rgba(0,0,0,0.5);
        height: 65px;
        left: 10px;
        opacity: 0;
        padding: 10px;
        position: absolute;
        width: calc(100% - 20px);
        z-index: -1;
    }
    .card-tile .text-content h4,
    .card-tile .text-content p {
        color: #fff;
        margin: 0;
        text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
    }

    /* All animations on hover */
    .card-tile:hover {
        transform: scale(1.1);
    }
    .card-tile:hover .text-content {
        opacity: 1;
        z-index: 1;
    }

    @media(max-width: 600px) {
        .card-tiles-container {
            flex-direction: column;
        }
        .card-tile {
            margin: 0 0 10px 0;
            width: 100%;
        }
    }
              
            
!

JS

              
                
              
            
!
999px

Console