Use a picture element for Location illustration

Probably better for performances
This commit is contained in:
2021-11-21 16:50:24 +01:00
parent 8759477b79
commit 8d487e0ef7
2 changed files with 19 additions and 21 deletions

View File

@@ -161,21 +161,16 @@
overflow: hidden;
transform-origin: top center;
div {
img {
display: block;
width: 100%;
height: 100%;
background: 0 0 var(--illus-mobile) no-repeat;
background-size: 100% auto;
height: auto;
object-fit: contain;
pointer-events: none;
user-select: none;
transform: translate3d(0, var(--parallax-y), 0);
transition: transform 0.7s var(--ease-quart);
will-change: transform, opacity;
@include bp (sm) {
background-image: var(--illus-desktop);
}
@include bp (xl) {
background-image: var(--illus-desktop-2x);
}
}
}