不知何故IE 11在另一個元素中缺少我的絕對定位元素,其中height:100%
。如果我給它一個固定的高度,它似乎只能工作。 (即使父的家長都有一個固定的一個)絕對位置高度100%將無法在IE 11上工作 - 但它確實在Microsoft Edge上
HTML
<div class="parent-table">
<div class="parent-cell">
<div class="child">
</div>
</div>
</div>
CSS
html,
body {
height: 100%
}
.parent-table {
display: table;
table-layout: fixed;
position: relative;
height: 400px;
width: 100%;
}
.parent-cell {
height: 300px;
background: blue;
position: relative;
width: 100%;
display: table-cell;
}
.child {
position: absolute;
top: 0;
bottom: 0;
height: 100%;
background: red;
width: 100%
}
- IE邊緣會顯示一個紅色的盒子(如預期工作)
- IE 11將顯示一個藍色框(完全m發出絕對的定位元素)
我假定你的意思是微軟的邊緣 - - 「IE邊緣> Click to see
修復後「指的是與IE11基本相同的其他內容。 Microsoft Edge *不是IE *。 – BoltClock
是的,微軟Edge – Alvaro