我想在表格中发布一些表格 td 宽度、BG 颜色不同的表格。我设计了以下 css,它在 Chrome 和 Fire fox 中运行良好,但在 Internet Explorer 中没有提供所需的输出。任何人都可以在这方面帮助我。
HTML:
<td class="td_1">Games</td>
<td class="td_2">Sports</td>
CSS:
.td_1 {
width:200px;
height:50px;
max-width:200px;
min-width:200px;
max-height:50px;
min-height:50px;
background-color: yellow;
color: red;
}
.td_2 {
width:300px;
height:50px;
max-width:300px;
min-width:300px;
max-height:50px;
min-height:50px;
background-color: blue;
color: white;
}
最佳答案
世界上不可能有错误的颜色。请注意您的 Internet Explorer 的用户代理样式不会覆盖您的样式表。尝试使用 reset.css 表重置所有 IE 的默认值。
在所有其他样式表之前首先包含 reset.css。你可以得到一个免费的Here
关于html - td css 适用于 chrome 但不适用于 IE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22557825/