【问题标题】:How to stretch the div along the parent's tr height in IE11 [duplicate]如何在 IE11 中沿父级的 tr 高度拉伸 div [重复]
【发布时间】: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>

https://jsfiddle.net/sz64jzvr/12/

【问题讨论】:

  • 此代码是示例,背景颜色只是说明如果您在 IE11 中打开它会出现问题

标签: html internet-explorer


【解决方案1】:

查看my post 以了解此问题的解决方案。在所有浏览器中进行了全面测试。

【讨论】:

    猜你喜欢
    • 2019-06-13
    • 2019-04-07
    • 2011-07-31
    • 2013-07-27
    • 2015-04-03
    • 2019-09-09
    • 2012-09-18
    • 2018-12-13
    • 1970-01-01
    相关资源
    最近更新 更多