<div class="container"></div>
@layer base, demo;
@layer demo {
.container {
background: #fff;
height: 250px;
position: relative;
width: 250px;
}
.container::before {
content: "";
background-image: url("https://images.unsplash.com/photo-1558244661-d248897f7bc4?crop=entropy&cs=tinysrgb&fm=jpg&ixid=MnwzMjM4NDZ8MHwxfHJhbmRvbXx8fHx8fHx8fDE2NjYxMTE5MjA&ixlib=rb-1.2.1&q=80");
background-size: 250px;
border-radius: 30px;
height: 100%;
left: -30px;
top: -30px;
padding: 30px;
position: absolute;
width: 100%;
z-index: -1;
}
}
@layer base {
body {
display: grid;
place-items: center;
height: 100vh;
}
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.