IE10重绘/重绘问题 [英] IE10 Repaint/Redraw issue

查看:166
本文介绍了IE10重绘/重绘问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以在这里查看此工作/打破: http://new.campchampions.com/parents

You can see this working/breaking here: http://new.campchampions.com/parents

这个问题只会在IE10中修复。在用户滚动了一些方法后,导航被固定(固定类被添加到 body 影响 hgroup.primary (我知道,我知道hgroup不是一个'东西'不要判断我。

The issue only crops up in IE10. After the user has scrolled a little ways, the navigation becomes pinned (a class of fixed gets added to the body which effects the hgroup.primary(I know, I know hgroup is not a 'thing' anymore. Don't judge me.)). If you go back to the top of the page, it un-pins, goes back to normal.

在IE10中,当您返回页面顶部时,您会回到页面顶部。 ,导航元素消失,直到鼠标向上移动到黄色条的任何部分。

In IE10, when you go back up to the top of the page, the nav elements disappear until the mouse moves up over ANY part of the yellow bar. It's driving me nuts.

我已经尝试过在滚动条上放置JS append / alter内容,或者取消固定导航。

I've attempted things like having JS append/alter content in various elements on scrolltop/un-pinning the navigation.

我有一个简短的YouTube视频显示了问题: http://youtu.be/-itTC_j -9YE

I've got a brief youtube video showing the issue: http://youtu.be/-itTC_j-9YE

任何想法或想法?这将是伟大的。谢谢!

Any thoughts, or ideas? That'd be great. Thanks!

推荐答案

虽然我没有坚实的答案这种重画问题的背后的原因,我发现一个即时jQuery隐藏/显示完全重新绘制元素,没有任何可见的副作用。

While I have no solid answer for the reason behind this redraw issue, I found that an instantaneous jQuery hide/show redrew the element completely without any visible side effects.

使用非jQuery JS hack向IE10中的HTML元素添加类(请参阅 Willem de Wit回答这个问题的答案),我确保这个代码只在IE10上启动。

Using a non-jQuery JS hack to add a class to the HTML element in IE10 (see Willem de Wit's answer to this quandry), I made sure this code only fired on IE10.

if($('html').hasClass('ie10')) {
  $('.primary').hide(0, function(){$(this).show()});
}

这篇关于IE10重绘/重绘问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆