我已经放置了3 div
。有位置相对的css
的第一个父母,它正在取全宽的视口。第二个孩子拥有覆盖父母所有区域的绝对位置。第三个孩子也有绝对的位置与margin: 0 auto
。CSS - 中心位置不在IE中有绝对位置
.slide-block {
position: relative;
}
.slide-block .slide-block-center-wrapper {
top: 0;
position: absolute;
left: 0;
right: 0;
bottom: 0;
}
.slide-block .slide-block-content {
max-width: 1180px;
margin: 0 auto;
padding: 0 30px;
position: absolute;
top: 50%;
transform: translate(0, -50%);
-moz-transform: translate(0, -50%);
-webkit-transform: translate(0, -50%);
-ms-transform: translate(0, -50%);
left: 0;
right: 0;
}
<div class="slide-block">
<div class="slide-block-center-wrapper">
<div class="slide-block-content">
...some slide caption content
</div>
</div>
</div>
的问题是,.slide-block-content
没有出现在中心IE
浏览器。它出现在中心的chrome
和mozilla
。
它没有出现在中心'chrome'和'mozilla'无论是。 –