您的位置:首页 > Web前端 > CSS

[CSS Hack] border-color:transparent & filter+ClearType bug

2007-08-22 18:25 429 查看
IE6不支持设置transparent为边框的颜色。

例如:
border:solid 1px transparent;





解决方法:
border:solid 1px transparent;
/*set an unused color to be index color*/
_border-color:tomato; /*For IE6-*/
/*then remove this indexed color*/
_filter:chroma(color=tomato);/*For IE6-*/

结果如下:




边框是没了,可字体怎么。。。
主意,以上现象是只有在打开系统的ClearType时才会看到的,如果把ClearType关掉就没问题了,见下:



关于这个问题的一个演示页面:
http://icant.co.uk/sandbox/msieopacityissue/
另:
http://www.hedgerwow.com/360/bugs/fix-ie-opacity-text.html

解决方法:
border:solid 1px transparent;
background-color:#BFDBFF;
/*set an unused color to be index color*/
_border-color:tomato; /*For IE6-*/
/*then remove this indexed color*/
_filter:chroma(color=tomato);/*For IE6-*/




搞了半天边框是透明了,底色又不透明了,汗!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐