0

http://farshadzandi.caで見られる金色のボタン効果を生成するために、div の背景をアニメーション化しています。

コードは次のとおりです。

$(function(){
  $(".navigation").hover(function(){
    $(this).children('.background').stop(true,true).animate({opacity: 1},250);
  }, function(){
    $(this).children('.background').stop(true,true).animate({opacity: 0},250);
  });
});

$(function(){
  $(".lower-navigation").hover(function(){
    $(this).children('.lower-background').stop(true,true).animate({opacity: 1},250);
  }, function(){
    $(this).children('.lower-background').stop(true,true).animate({opacity: 0},250);
  });
});

これは Firefox/Chrome では正常に動作しているのに、ページの読み込み時に IE で背景画像が表示される理由を誰か教えてもらえますか? ありがとうございました!

4

1 に答える 1

1

IE の場合、次の CSS 構文を使用する必要があります。

/* IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";

/* IE 5-7 */
filter: alpha(opacity=50);
于 2012-08-07T05:14:06.200 に答える