【发布时间】:2012-12-21 11:31:54
【问题描述】:
考虑以下 HTML 代码:
<style> td, tr { border:1px solid gray; } </style>
<table class="tableinfo" cellspacing="1" cellpadding="3">
<tr>
<td>asd</td>
<td>bsd</td>
</tr>
<tr style="display: block;" >
<td class="">ttt</td>
<td class="">asd</td>
</tr>
</table>
使用文档类型:
<!doctype html>
在 IE9 中一切正常,但在 IE10 中表损坏:
为什么会这样?
如何解决这个问题?
一种解决方案是添加以下内容:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
但这会破坏整个项目的样式。
【问题讨论】:
标签: html html-table internet-explorer-10 compatibility-mode