IE8 does not hover when using an li with position:absolute

后端 未结 2 1553
半阙折子戏
半阙折子戏 2021-01-24 20:40

I have a sort of an image map, where I\'ve used li\'s to create the elements, and on hovering the information pops up. The html code is:

  • 相关标签:
    2条回答
    • 2021-01-24 21:37

      From http://msdn.microsoft.com/en-us/library/ms530766.aspx

      Windows Internet Explorer 7 and later, in standards-compliant mode (strict !DOCTYPE), can apply the :hover pseudo-class to any element, not only links. If the pseudo-class is not applied specifically to an element in the selector, such as the A tag, the Universal (*) Selector is assumed. Indiscriminate use of the :hover pseudo-class can negatively impact page performance.

      See Defining Document Compatibility

      0 讨论(0)
    • 2021-01-24 21:42

      Internet Explorer has some problems with dealing with :hover events, especially for li elements. You need to use this: http://www.xs4all.nl/~peterned/csshover.html

      Should work for you then. If all else fails, and in my case, I use jQuery's hoverIntent to show menus reliably.

      0 讨论(0)
    提交回复
    热议问题