为什么这适用于firefox和chrome,但不适用于IE8

时间:2014-02-18 18:29:53

标签: html css iframe

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>

.box{
    display: none;
    width: 100%;
}

a:hover + .box,.box:hover{
    display: block;
    position: relative;
    z-index: 100;
}

</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<a href="Spanishwordoftheweek.pdf"><img src = "spanishwordbanner.png"  /></a><div class="box"><iframe src="Spanishwordoftheweek.pdf" width = "800" height = "1050"> <p> Your browser does not support iframe. </p></iframe></div>
</body>
</html>

这是一张在悬停时显示pdf的简单图片。它在chrome和firefox中完美运行,但在IE8中却不行。有人知道为什么吗?

由于

1 个答案:

答案 0 :(得分:1)

这是Internet Explorer中的一个错误,其中“某些”元素不支持悬停。也许this stack overflow thread与您的问题有关。

编辑:找到another one

相关问题