0

ホバーすると水平方向に展開する垂直メニューを作成しました。chrome と firefox では夢のように動作しますが、インターネット エクスプローラーではなぜか気に入りません。任意の要素にカーソルを合わせると、すべてが飛び出します。

この関数は、animate を使用して CSS を変更する jquery プラグインのホバー インテントを使用します。これがコードの一部です...

// one of these functions for each menu item, the inactive3 is obviously changed to the different list element

  $('li.inactive3').hoverIntent(expandit3, resetit3);

  function expandit3(){
$('li.inactive3').stop().animate({ width: "609px",height: "306px"}, "fast" );
  }

  function resetit3(){
$('li.inactive3').stop().animate({ width: "150px",height: "153px"}, "slow" );
  }


// the list elements are contained in the menudiv

#menudiv {
 z-index: 3;
 float: left;
 visibility: visible;
 position: fixed;
 display:block;

overflow:hidden;
}

// here is the list item css

  .inactive3 {
 z-index: 3;
 list-style-type: none;
 width: 150px;
 height: 153px;
 overflow: hidden;
 margin: 0px;
 padding: 0px;
 visibility: visible;
clip:auto;
display:block;
}

私はこの問題について何日も頭を悩ませてきたので、どんなアイデアでも非常に役に立ちます.ieexplorerに何らかの問題があるようです.

乾杯

4

2 に答える 2

0

リスト要素の位置を相対的に設定する必要がありました。助けてくれてありがとう。

于 2010-12-13T14:03:29.953 に答える
0

これはすべてのブラウザーでの動作である必要があります。要素ごとの動作を行うには、次thisのように現在の要素に使用する必要があります。

$('li.inactive3').hoverIntent(expandit3, resetit3);
function expandit3(){
  $(this).stop().animate({ width: "609px",height: "306px"}, "fast" );
}
function resetit3(){
  $(this).stop().animate({ width: "150px",height: "153px"}, "slow" );
}
于 2010-12-13T11:10:56.363 に答える