我有一个表结构,我需要嵌套元素来获取表格单元格的所有大小.所以我把它设置为绝对并将其所有位置定义为0,它在FireFox和Chrome上工作得很好但在IE上却不行:(
这是标记:
<div class="table">
<div class="cell">
<figure class="illustration">My illustration</figure>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
.table {
display: table;
width: 400px;
}
.cell {
position: relative;
display: table-cell;
height: 600px;
background-color: grey;
}
.illustration {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: red;
color: #fff;
}
Run Code Online (Sandbox Code Playgroud)
这是我的笔:http: //codepen.io/balix/pen/qEMwzj
如果你看到红色背景就可以了;)
IE的任何黑客攻击?