【发布时间】:2018-04-17 00:12:25
【问题描述】:
我有一些如下代码。如何让它像在 Chrome 中一样在 IE11 中工作?我需要沿父级的 tr 高度拉伸 div。
<table>
<tr>
<td style="position: relative; width: 50px">
<div style="height: 50px; background-color: #0C59CF"></div>
</td>
<td style="position: relative; width: 50px">
<div style="position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0; background-color: #5cb85c">
</div>
</td>
</tr>
</table>
【问题讨论】:
-
此代码是示例,背景颜色只是说明如果您在 IE11 中打开它会出现问题