vertical centered pictures

This commit is contained in:
2021-03-07 13:13:32 +01:00
parent d2887597d1
commit f3ed818f7b

View File

@@ -15,22 +15,25 @@ $selected = $files[random_int(0, count($files)-1)];
<title>Hello, world!</title> <title>Hello, world!</title>
<style> <style>
html, body, #mainContainer, #mainCarousel, .carousel-inner, .carousel-item {
height: 100%;
}
.carousel-item img {
max-width: 100%;
max-height: 100%;
}
body { body {
background-color: #222; background-color: #222;
} }
.carousel-inner { html, body, #mainContainer, #mainCarousel, #mainCarousel .carousel-inner, #mainCarousel .carousel-item {
height: 100%;
}
#mainCarousel .carousel-item {
text-align: center; text-align: center;
} }
#mainCarousel .carousel-item img {
position: relative;
max-width: 100%;
max-height: 100%;
top: 50%;
transform: translateY(-50%);
}
</style> </style>
</head> </head>
<body > <body >