SCSS
by Bartek Legięć
HTML
<div class="dynamic-shadow"></div>
SCSS
.dynamic-shadow {
position: relative;
width: 300px;
height: 300px;
z-index: 1;
background-image: linear-gradient(135deg, #1e5799 0%, #FF0000 100%);
background-size: cover;
border-radius: 5px;
&::before{
content: '';
width: 100%;
height: 100%;
position: absolute;
background: inherit;
top: 0;
left: 0;
opacity: 1;
z-index: 2;
border-radius: inherit;
}
&::before {
filter: blur(50px);
opacity: 1;
z-index: 1;
}
}
/* This is to make it pretty */
body {
background: #151515;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
margin: 0;
padding: 16px;
box-sizing: border-box;
}