Center the image in older browsers
This commit is contained in:
parent
3941358e20
commit
4c786fbce9
@ -9,21 +9,21 @@
|
|||||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
html, body { height: 100%; overflow: hidden; background: #1a1a1a; }
|
html, body { height: 100%; overflow: hidden; background: #1a1a1a; }
|
||||||
#container {
|
#container {
|
||||||
position: relative;
|
|
||||||
height: 100%;
|
|
||||||
display: table;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
zoom: 1;
|
||||||
}
|
}
|
||||||
img {
|
img {
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
|
width: auto;
|
||||||
|
height: auto;
|
||||||
|
display: block;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
img { max-width: 100%; max-height: 100%; cursor: pointer; }
|
|
||||||
.chevron {
|
.chevron {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 33%;
|
top: 33%;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user