Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 使用位置为“绝对”的li时,IE8不会悬停_Html_Css_Internet Explorer 8_Hover - Fatal编程技术网

Html 使用位置为“绝对”的li时,IE8不会悬停

Html 使用位置为“绝对”的li时,IE8不会悬停,html,css,internet-explorer-8,hover,Html,Css,Internet Explorer 8,Hover,我有一种图像地图,在那里我用李的来创建元素,悬停的时候会弹出信息。html代码是: <li id="b906" style="z-index: 1000;"> <a href="#"> <span>&nbsp;</span> <span class="para">Some text and maybe an image goes here.</span> </a&

我有一种图像地图,在那里我用李的来创建元素,悬停的时候会弹出信息。html代码是:

<li id="b906" style="z-index: 1000;">
    <a href="#">
        <span>&nbsp;</span>
        <span class="para">Some text and maybe an image goes here.</span>
    </a>
</li>
这在所有浏览器中都能很好地工作,但IE8没有显示悬停时的跨距。但是,如果我放一个边框:1px实心红色;在li上,跨距确实会显示,但前提是我的鼠标正好位于1px的薄边框上。如果光标位于li中,则不会仍然显示

我做错了什么(
感谢您的帮助。

Internet Explorer在处理:悬停事件时遇到一些问题,尤其是对于li元素。您需要使用以下方法:

那我应该为你工作。 如果所有这些都失败了,在我的例子中,我使用jQuery的hoverIntent可靠地显示菜单。

From

Windows Internet Explorer 7及更高版本在符合标准的模式(strict!DOCTYPE)下,可以将:hover伪类应用于任何元素,而不仅仅是链接。如果伪类不是专门应用于选择器中的元素,例如A标记,则通用(*)不加选择地使用:hover伪类会对页面性能产生负面影响


请参见

我们是否可以查看更多HTML文档以帮助确定IE8使用的是哪种文档模式?而且,
在我看来就像一个段落……为什么不直接使用
?(参考)
#map ul li {
position: absolute;
list-style: none;
top: 0;
left: 0;
width: 100px;
height: 100px;
text-align: center;
display: block;
}

#map ul li a {
color: #000;
text-decoration: none;
color: #fff;
display: none;
position: absolute;
top: 0;
left: 0;
}

#map ul li:hover a {
display: block;
}

#map ul li a span {
display: block;
width: 100%;
height: 120px;
border: 2px solid #777;
}

#map ul li a span.para {
display: block;
background: #777;
padding: 2px;
-moz-border-radius: 5px;
border-radius: 5px;
width: 100px;
}