出于某种奇怪的原因,IE 忽略了我的列宽,只是将所有六列设置为相等的宽度。
table{
table-layout: fixed;
}
<colgroup>
<col style="width: 15%;" />
<col style="width: 40%;"/>
<col style="width: 5%;" />
<col style="width: 10%;" />
<col style="width: 10%;" />
<col style="width: 20%;" />
</colgroup>
最佳答案
简答: 因为 IE 很烂
长答案:
使用 <table>
, <tr>
和 <td>
反而。并使用 colspan
属性来达到同样的效果。
关于html - Internet Explorer 8 忽略表格上的列组宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21443940/