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

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

              
                <link href="https://fonts.googleapis.com/css?family=Jua&display=swap" rel="stylesheet">
<div class="hover_wrap">
        <figure class="hover5">
            <img src="https://tistory2.daumcdn.net/tistory/2933724/skin/images/hover03.jpg" alt="이미지1">
            <figcaption><strong>mouse hover</strong></figcaption>
        </figure>
        <figure class="hover6">
            <img src="https://tistory2.daumcdn.net/tistory/2933724/skin/images/hover05.jpg" alt="이미지1">
            <figcaption><strong>mouse hover</strong></figcaption>
        </figure>
    </div>
              
            
!

CSS

              
                    body {
        height: 100vh;
        background: #0f2027;
        background: linear-gradient(120deg, #2c5364, #203a43 100%);
        font-size: 16px;
        margin: 0;
        padding: 0;
        font-family: 'Jua', sans-serif;
    }

    .hover_wrap {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
    }

    .hover_wrap figure {
        width: 400px;
        margin: 10px;
        cursor: pointer;
        overflow: hidden;
        position: relative;
        background: #fff;
        border-radius: 4px;
    }

    .hover_wrap figure img {
        width: 100%;
        display: block;
        transition: all .3s ease;
        border-radius: 4px;
    }

    .hover_wrap figure figcaption {
        position: absolute;
        left: 50%; top: 50%;
        /*
        left: 0; top: 0; right: 0; bottom: 0;
        margin: auto;
        */
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        transition: all .3s ease;
        background: #000;
        width: 150px;
        height: 150px;
        border-radius: 50%;
    }

    .hover_wrap figure figcaption strong {
        color: #fff;
        z-index: 20;
        font-size: 16px;
        text-transform: uppercase;
    }


    .hover_wrap figure:hover img {
        opacity: 0.1;
    }

    .hover_wrap figure.hover5 figcaption{transform: translate(150%, -50%) rotate(360deg)}
    .hover_wrap figure.hover6 figcaption{transform: translate(-250%, -50%) rotate(-360deg)}
    .hover_wrap figure:hover figcaption{transform: translate(-50%, -50%)}
    /*
    .hover_wrap figure.hover5 figcaption{transform: translateX(80%) rotate(360deg)}
    .hover_wrap figure.hover6 figcaption{transform: translateX(-80%) rotate(-360deg)}
    .hover_wrap figure:hover figcaption{transform: translateX(0)}
    */
    @media(max-width:800px) {
        .hover_wrap {
            flex-direction: column;
        }
    }
              
            
!

JS

              
                
              
            
!
999px

Console