IE8悬停问题,导致页面消失

发布于 2024-10-05 15:23:31 字数 616 浏览 0 评论 0原文

我在使用 IE8 时遇到了一个奇怪的问题,其他所有浏览器都显示一切正常,但无论我做什么,IE8 都无法正常运行。

我有一个 div 网格,每个 .gridCell div 都包含一个隐藏的 div,我想在悬停时显示它。

到目前为止,我已经尝试使用 javascript 将一个类应用于悬停时的 .gridCell div,并使用 css 将预览 div 设置为使用 .hover 类显示块。在除 IE8 之外的所有浏览器中都能完美运行,当鼠标悬停时,整个页面都会消失,直到您再次移动鼠标。

我还尝试过使用jquery在悬停时为隐藏的div设置动画的各种尝试,这些尝试在每个浏览器中都有效,但在IE8中,无论我尝试哪个版本,悬停时整个页面都会跳转到顶部。

我在这里提出了一个粗略的测试用例

在我的杂乱演示中,存在 z-index 问题,但这些问题可以忽略,因为在正确的版本中它们已排序,这只是为了说明问题。使用jquery向下滚动到第二行,在IE8中,页面将在悬停时跳转到顶部。

我确信我只是错过了一些简单的东西,但我越看它就越沮丧!

提前致谢。

I've got a weird problem with IE8, every other browser displays everything fine, but no matter what I do IE8 just won't play nice.

I've got a grid of divs, each .gridCell div contains amongst other elements a hidden div that I'd like to reveal on hover.

So far, I've tried applying a class to the .gridCell div on hover with javascript and using css to set the preview div to display block using the .hover class. Works perfectly in every browser besides IE8, which when hovering makes the whole page disappear until you move the mouse again.

I've also tried various attempts using jquery to animate the hidden div on hover, which all work, again in every browser, yet in IE8 on hover the whole page jumps to the top on hover no matter which version I try.

I've put up a rough test case here.

In my scrappy demo, there are z-index issues, but these can be ignored as in the proper version they're sorted, this is just to illustrate the problem. Scroll down to the second row using jquery, and in IE8 the page will jump up to the top on hover.

I'm sure I'm just missing something simple here, but the more I look at it the more frustrated I get!

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

风渺 2024-10-12 15:23:31

好吧,我找出了导致问题的原因。我用于触发器的 div 的位置相对于我之前所做的一些不相关的事情,但随后被废弃,删除声明修复了 IE8 中的页面跳转。

Well, I worked out what was causing the problem. The div I was using for the trigger was positioned relatively from something unrelated I'd done earlier but then scrapped, removing the declaration fixed the page jumping in IE8.

匿名。 2024-10-12 15:23:31

我在 ie 8 和其他版本中遇到的唯一问题是 z-index,仅此而已。您可以提供屏幕截图或其他内容来查看您所得到的内容吗?页面对我来说并没有消失

the only issue i came across in ie 8 and other versions was z-index and nothing else. can u provide a screenshot or something to look into what you are getting. page isn't disappearing for me

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文