【发布时间】:2012-10-29 21:48:55
【问题描述】:
.csstdhighlight
{
border-left-color: Red;
border-right-color: Red;
border-bottom-color: Red;
border-top-color: Red;
border-style: solid;
border-width: 1px;
background-color: White;
}
<html>
<body>
<style type="text/css" media="screen">
.csstdhighlight
{
border:1px solid red;
background-color: White;
}
</style>
<table>
<tr>
<td class="csstdhighlight">foo</td>
<td>bar</td>
</tr>
</table>
</body>
</html>
我正在为表格单元格应用边框,但 CSS 不适用于早于 8 的 IE 版本。
【问题讨论】:
-
你知道的,这可以简化为
border: 1px solid red; background: white; -
我检查你的代码背景是否适用,但边框不适用
-
请发布您的 css 应用到的 html,如果可能,请创建一个 jsfiddle.net 显示问题以供测试。
-
jsfiddle.net/2sjaZ/18 见 IE 6/7
-
我刚刚检查了你的小提琴。它在 IE7 中运行良好。
标签: html css internet-explorer