<picture class="Element" style="--image: url(https://images.unsplash.com/photo-1511692277506-3be3a7ab1686)">
<img src="https://images.unsplash.com/photo-1511692277506-3be3a7ab1686" alt="">
<span class="Border"></span>
</picture>
.Element {
position: relative;
width: 200px;
display: block;
}
.Element > img {
box-shadow: 0 0 20px #bac3c3;
}
.Element > * {
height: 100%;
width: 100%;
display: block;
}
.Element::before,
.Element::after{
content: "";
display: block;
position: absolute;
background-color: cyan;
width: 50%;
height: 50%;
z-index: 1;
background-image: var(--image);
background-size: 200%;
pointer-events: none;
user-select: none;
}
.Element::after {
bottom: 0;
right: 0;
background-position: right bottom;
}
.Border {
top: 0;
position: absolute;
box-sizing: border-box;
border: 15px #eb311f solid;
transform: rotate(45deg);
}
@use postcss-preset-env {
stage: 0;
autoprefixer: {
grid: true;
}
browsers: [
"last 1 Chrome versions",
"last 1 Firefox versions",
"last 1 Safari versions",
"last 1 Edge versions"
]
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.