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

              
                    <title>jCafe - Image Shdow Trick</title>
    <link href="./site.css" rel="stylesheet"  type="text/css"/>
    <div class="img-container">

        <figure>
        <img
            class="img-thumb img-border" 
            src="./foo.jpg"
            alt="jCafe Logo" />
            <figcaption class="img-caption">Lost Image View</figcaption>
        </figure>
    
        <figure>
        <img
            class="img-thumb img-border" 
            src="https://jcafe.ir/img/style/brand250.png"
            alt="jCafe Logo" />
            <figcaption class="img-caption">Demo Image</figcaption>
        </figure>

            <figure>
                <img
                    class="img-thumb img-border img-shadow" 
                    src="./foo.jpg"
                    alt="jCafe Logo" />
                    <figcaption class="img-caption">Lost Image Preview Trick</figcaption>
            </figure>
    
    </div>
              
            
!

CSS

              
                .img-container{
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding-top: 10rem;
    padding-bottom: 10rem;
}

.img-caption{
    text-align: center;
    margin-top: 1rem;
}

.img-thumb{
    height:16rem;
    width:16rem;
    min-height:16rem;
    min-width:16rem;
}

.img-border{
    border: 1px #eee solid;
    border-radius: 15px;
    box-shadow: 8px 8px 12px #32323255;
    transition-property:box-shadow;
    transition-duration: 500ms;
}

.img-border:hover{
    border: 1px #eee solid;
    border-radius: 15px;
    box-shadow: 8px 8px 26px #32323255;
}

.img-shadow{
    position: relative;
    overflow: hidden;
}

.img-shadow::before{
    content: ' ';
    display: block;
    width: 100%;
    height: 100%;
    background: #aaa;
    position: absolute;
    top: 0px;
    left: 0px;
    border-style: dashed;
    border-width: 1px;
    border-radius: 5px;
    border-color: rgb(95, 33, 97);
    overflow:hidden;
}

.img-shadow::after{
    content: attr(alt);
    position: absolute;
    width: 100%;
    height: 100%;
    top: 25%;
    left: 0px;
    text-align: center;
    color: rgb(95, 33, 97);
    overflow:hidden;
}
              
            
!

JS

              
                
              
            
!
999px

Console