请问一下有谁遇到过这种情况,在IE8下 当filter一加载的时候 就会遮住border?
代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<style>
th {
-ms-filter:"progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=white, endColorstr=gray)";
border:10px solid red;
}
</style>
</head>
<body>
<table>
<tr>
<th>Give me a border</th>
</tr>
</table>
</body>
</html>
加 position: absolute;
<style type="text/css">
th
{
border: 1px solid red;
position: absolute;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=white, endColorstr=gray)";
}
</style>
两个以上,可以多增加几个class
<style type="text/css">
th
{
border: 1px solid red;
position: absolute;
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr=white, endColorstr=gray)";
}
.th1
{
left: 0px;
}
.th2
{
left: 100px;
}
</style>
<table>
<th class="th1">
Give me a First border
</th>
<th class="th2">
Give me a Second border
</th>
</tr>
</table>
或你在后台可以直接输出这段代码。就不用增加那么多class了!
楼主怎么解决的?