IE Opacity Bug

先看這頁:jquery-animate.html,用 以及 IE 各看一次,然後游標試著在兩個段落上移動看看,在 IE 上應該會變成這樣:

找了資料以後確定這是 IE 的 bug,也有解法:MSIE animated fade problems,解法是設定 background 屬性 (不確定設成底圖可不可以,不過確定 "transparent" 不可以)。經過測試發現可以在 Javascript 裡面設定 background,而不用事先在 CSS 裡面設。

對 IE 的 browser detecting 也很簡單:(Ref:Using the navigator object to detect client's browser)

if (navigator.appVersion.indexOf("MSIE") != -1) {
  // ...
}

目前看起來沒有問題,不過 background 屬性不能是 transparent 還蠻麻煩的...

5 thoughts on “IE Opacity Bug”

  1. V!c says:

    那是render engine的bug,真的只可以用background color解...background image是沒用的...

  2. V!c says:

    ***只有Bold了的字才會爛***

    沒有Bold的不會有事

  3. Gea-Suan Lin says:

    跟 bold 沒有關係。

  4. V!c says:

    是Bold text才會爛字...
    http://jszen.blogspot.com/2005/04/ie-bold-text-opacity-problem.html

    因為預設字型不一樣Demo page看起來和你cap screen的不同...
    我看的jquery-animate.html,字在mouseover時沒有bold,看起來好好的說...

Leave a Reply

Your email address will not be published. Required fields are marked *