Use flexbox to center images and video

This commit is contained in:
2022-10-25 12:13:50 +02:00
parent 01f407e4b1
commit 64d0b364ba
5 changed files with 31 additions and 25 deletions

View File

@@ -67,10 +67,10 @@ const mouseup = (e) => {
<style>
.container {
display: block;
display: flex;
justify-content: center;
height: 100%;
width: 100%;
text-align: center;
overflow: hidden;
}
.container.zoom {
@@ -82,16 +82,11 @@ const mouseup = (e) => {
margin: auto;
max-width: 100%;
max-height: 100%;
top: 50%;
cursor: pointer;
transform: translateY(-50%);
box-shadow: 0 0 4px var(--shadow_color);
}
.image.zoom {
max-width: none;
max-height: none;
top: 0;
cursor: move;
transform: none;
}
</style>