now position of div is changed by translate instead of left/top

This commit is contained in:
Spedon
2023-03-16 21:42:28 +08:00
parent 19e89db88a
commit 944af06dc4
2 changed files with 23 additions and 59 deletions

View File

@@ -1,29 +1,16 @@
.image_container {
max-height: 55vmin;
position: absolute;
width: auto;
max-width: 100vw;
transform: translate(-50%, -50%, 0);
opacity: 1;
display: flex;
align-items: center;
will-change: transform;
img {
max-height: 55vmin;
max-width: 100vw;
object-fit: contain;
width: auto;
}
top: 0;
left: 0;
&[data-status='t0'] {
transition: all 0.5s ease-in-out 1.5s;
max-height: calc(100vh - var(--footer-height));
img {
transition: all 0.5s ease-in-out 2s;
max-height: calc(100vh - var(--footer-height));
}
}
&[data-status='t1'] {
@@ -49,11 +36,6 @@
&[data-status='r0'] {
max-height: 55vmin;
transition: all 0.5s ease-in-out 1s;
img {
transition: all 1s ease-in-out 0s;
max-height: 55vmin;
}
}
&[data-status='r1'] {