modify image display and use data-status to represent status

This commit is contained in:
Spedon
2023-03-11 14:36:02 +08:00
parent 2109655997
commit 81207b5215

View File

@@ -1,4 +1,4 @@
.image { .image_container {
max-height: 55vmin; max-height: 55vmin;
position: absolute; position: absolute;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
@@ -9,12 +9,12 @@
} }
} }
.inactive { .image_container[data-status="inactive"] {
opacity: 0; opacity: 0;
transition: opacity 300ms ease-in-out; transition: opacity 300ms ease-in-out;
} }
.active { .image_container[data-status="active"] {
opacity: 1; opacity: 1;
transition: opacity 0ms ease-in-out; transition: opacity 0ms ease-in-out;
} }
@@ -22,15 +22,17 @@
.top { .top {
transition: all 0.5s ease-in-out 1.5s; transition: all 0.5s ease-in-out 1.5s;
max-height: calc(100vh - var(--footer-height)); max-height: calc(100vh - var(--footer-height));
width: auto;
max-width: 100vw;
display: flex; display: flex;
align-items: center; align-items: center;
width: auto;
img { img {
transition: all 0.5s ease-in-out 2s; transition: all 0.5s ease-in-out 2s;
max-height: calc(100vh - var(--footer-height)); max-height: calc(100vh - var(--footer-height));
width: auto; width: auto;
max-width: 100vw; max-width: 100vw;
object-fit: contain;
} }
} }