IE8 渲染错误:在 javascript 可见性切换后,div 内容保持白色
此处的页面 (http://skergeth.net/slidingfooter/) 包含一个页脚,当您点击联系我们。 然后它会显示一个联系表格。
然而,在 IE8 中,它会向上滑动,并且包含表单的 div 保持白色,直到鼠标悬停在其上。 我还尝试了 footer-div 具有溢出:隐藏的方法,但由于页脚内还有其他元素应该溢出(延伸到顶部的菜单),因此这不是一个选项。
我不认为它是 javascript,但因为我尝试延迟转换并确保在它之前调用 setVisible,但结果相同。
我希望我说清楚了。
感谢您的所有回答!
The page here (http://skergeth.net/slidingfooter/) contains a footer that slides up when you click on contact us. It then shows a contact form.
However in IE8 it slides up and the div containing the form stays white until it is hovered by the mouse.
I also tried the approach that the footer-div has overflow:hidden but since there are other elements inside the footer that should overflow (a menu that extends to the top), this is not an option.
I don't think it is a javascript but because I tried to delay the transition and made sure, the setVisible is called before it but with the same result.
I hope I made myself clear.
Thanks for all your answers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
为 id="footercontent" 的 div 添加 height:1%
它应该可以工作。(注意:在所有浏览器上测试它)
当 IE 找不到高度值时会发生这种情况
add height:1% for the div which is after the div having the id="footercontent"
and it should work.(note: test it on all browsers)
this is happened when the IE didn't find a value for the height
尝试添加缩放:1和/或位置:相对于#footercontent或其内部的任何元素。 这会强制 IE 设置 hasLayout 并修复许多 CSS 问题。
Try adding a zoom:1 and/or position:relative to #footercontent or any of the elements inside of it. This forces IE to set a hasLayout and fixes lots of css issues.
我遇到过同样的问题。 解决了它:
I had the same issue. Solved it with:
包含表单的 div 似乎加载得很好,因为“联系我们”
h1
是可见的。 这是 IE8 中未显示的具体表单。尝试使用
form
元素的显示属性。The div containing the form seems to load fine, since the "Contact Us"
h1
is visible. It's the form specifically that isn't being displayed in IE8.Try playing with the display properties of the
form
element.