Html CSS DIV悬停在Internet Explorer 8中不工作
当我在InternetExplorer8中悬停DIV元素时,我的CSS规则没有正确应用 以下代码可以正常工作:Html CSS DIV悬停在Internet Explorer 8中不工作,html,css,internet-explorer,internet-explorer-8,Html,Css,Internet Explorer,Internet Explorer 8,当我在InternetExplorer8中悬停DIV元素时,我的CSS规则没有正确应用 以下代码可以正常工作: <div id="album-view"> <div class="loading"></div> <div id="main"> here is my all code, this code works. </div> </div> 如果有人有任何建议,请帮我指引正确的方向 你可以看到我的测试服务器,nasi
<div id="album-view">
<div class="loading"></div>
<div id="main">
here is my all code, this code works.
</div>
</div>
如果有人有任何建议,请帮我指引正确的方向
你可以看到我的测试服务器,
nasir.herobo.com/s.html!/4
或屏幕截图在IE8中显示:无;,因为它是内联样式,所以不会被css覆盖。您必须使用JavaScript来更改内联样式,或者添加显示:none;添加到css而不是元素。IE8及以下版本与较新的浏览器具有不同的样式层次结构。我最近在IE8上遇到了一个css:hover问题。我的不透明度更改在hover上无法正常工作,因为应用了:hover样式的div包含css position属性为“relative”的子div。就我而言,“相对”不是必要的风格。将“位置”属性更改为“静态”完成了此操作,悬停时的不透明度更改按预期进行
我花了几个小时研究答案,最后自己解决了。希望tid能帮助其他人。你能发布一些更完整的代码吗,比如CSS,或者如果你在HTML中直接包含了hover伪代码?代码很多,你可以看到我的测试服务器nasir.herobo.com/s.HTML#/4将div设置为a背景色,然后查看悬停是否有效。IE似乎让事物通过透明的部分。可以通过透明图像进行修复。
<div id="album-view">
<div class="loading" style="display:none;"></div>
<div id="main">
Not working
</div>
</div>