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

來源:互聯網
上載者:User

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-*/ 

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

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.