首页 新闻 会员 周边

TH loses border when gradient filter applied ie8

0
悬赏园豆:100 [已关闭问题]

请问一下有谁遇到过这种情况,在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>

流星陨落的主页 流星陨落 | 初学一级 | 园豆:95
提问于:2009-09-10 16:19
< >
分享
其他回答(1)
0

 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了!

邀月 | 园豆:25475 (高人七级) | 2009-09-10 17:03
不行 如果你添加两个TH的时候 怎么办?都叠在一起了
支持(0) 反对(0) 流星陨落 | 园豆:95 (初学一级) | 2009-09-10 17:57
哎 我觉得这样做是没错 但是过于繁琐,因为后台代码不能随便添加,只有通过背景图片来代替了
支持(0) 反对(0) 流星陨落 | 园豆:95 (初学一级) | 2009-09-11 13:57
0

楼主怎么解决的?

天兔 | 园豆:202 (菜鸟二级) | 2014-06-17 10:30
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册