BLACK JACK

Get busy living, or get busy dying.

导航

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

Posted on 2007-08-22 18:25  J. Lin  阅读(2858)  评论(7编辑  收藏  举报

IE6不支持设置transparent为边框的颜色。

例如:
border:solid 1px transparent;

tb1

解决方法:
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-*/

结果如下:
tb2

边框是没了,可字体怎么。。。
主意,以上现象是只有在打开系统的ClearType时才会看到的,如果把ClearType关掉就没问题了,见下:
tb3 
关于这个问题的一个演示页面:
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-*/
 

tb4 
搞了半天边框是透明了,底色又不透明了,汗!!!