CSS Reflective Shadows like Image | CSS Shadow

Learn how to create css reflective shadow

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./card.css">
    <title>Card</title>
</head>
<body>

    <div class="container">

        
        <div class="card">
            <img src="./image.jpg" alt="">
        </div>
        


        

    </div>
    
</body>
</html>

CSS

*{
    margin: 0;
    padding: 0;
}

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


.card{
    width: 20em;
    position: relative;
}

.card > img{
    width: 100%;
    border-radius: .5em;
    -webkit-border-radius: .5em;
    -moz-border-radius: .5em;
    -ms-border-radius: .5em;
    -o-border-radius: .5em;
}

.card::after{
    content: "";
    background-image: url("/image.jpg");
    width: 100%;
    height: 100%;
    position: absolute;
    top: 25px;
    left: 15px;
    background-size: cover;
    filter: blur(15px);
    -webkit-filter: blur(15px);
    z-index: -99;
}


reecry

Recent Posts

Insta360 – Videos keep exporting backwards | Wrong side render in insta360

https://youtu.be/0RRUOIvmuWA I realized that I had my camera set up incorrectly, so when I upload…

8 months ago

Make Animated progress step bar using Figma

https://youtu.be/C3oFfV20K_c Make Animated progress step bar using Figma

10 months ago

How to Hide All Grids in Figma

https://youtu.be/o3pSH_oRzko How to Hide All Grids in Figma

10 months ago

How to Create Responsive Tool tip in figma

https://youtu.be/hdSUylKSsho How to Create Responsive Tool tip in Figma

10 months ago

Pixel Grid not visible in figma | How to Turn on figma Pixel Grid

https://youtu.be/AEiH7dSDhKo Having issue in figma pixel grid? learn how to show/ hide figma pixel grid…

10 months ago

Fix External Monitor Lag on Mac OS Ventura

https://youtu.be/iilYzHg9LwQ There are some issues going on in ventura OS its still in development phase…

1 year ago