使用 jQuery animate 时,有没有办法隐藏 webkit 浏览器中显示的工件?

发布于 2024-11-27 00:21:05 字数 218 浏览 3 评论 0原文

我正在使用 jQuery animate 在网页上的项目中滑动。由于某种原因,只有在 webkit 浏览器中,元素动画的空间中才会出现伪影痕迹。有没有办法阻止或隐藏这种情况?

一旦您加载页面,它们就会在轮播中看到: http://www.mywebclass.org/~jeff /

I am using jQuery animate to slide in items on a web page. For some reason, only in webkit browsers, there is a trail of artifacts across the space the element was animated over. Is there a way to stop this from happening or hide it?

They are seen on the carousel once you load the page here: http://www.mywebclass.org/~jeff/

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

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

发布评论

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

评论(4

对岸观火 2024-12-04 00:21:05

在动画回调中,向下滚动 1px,然后向上滚动 1px:

$(this).addClass('active');
scrollTo(document.body.scrollLeft, document.body.scrollTop + 1);
scrollTo(document.body.scrollLeft, document.body.scrollTop - 1);

In your animate callback, scroll down 1px then back up 1px:

$(this).addClass('active');
scrollTo(document.body.scrollLeft, document.body.scrollTop + 1);
scrollTo(document.body.scrollLeft, document.body.scrollTop - 1);
逆光下的微笑 2024-12-04 00:21:05

在这台机器上,我看不到任何痕迹,但我知道你所说的效果。

这不是直接的解决方案,但我似乎记得在较慢的系统上对左属性进行动画处理非常耗费资源。如果您使用设置了 overflow:hidden;

和一张较大的幻灯片(供您移动),那么整体上可能会带来更流畅的体验动画 scrollLeft() 而不是这些动画。

在 jQuery for Designers 上有一篇关于这一点的文章,我会在找到它后进行更新。

更新:“面向设计师的 jQuery - 溢出的乐趣”

On this machine here, I can't see any trails, but i know the effect you're talking about.

It's not directly a solution, but I seem to remember that animating the left-property is very resource-heavy on slower systems. It would probably lead to an overall more smooth experience if you would work with a <div> where overflow:hidden; is set and one larger slide, that you move by animating scrollLeft() instead of these animations.

There was a post on jQuery for Designers about that, i'll update once i've found it.

Update: "jQuery for Designers - Fun with Overflows"

我的奇迹 2024-12-04 00:21:05

我只在 H1 中看到动画的剩余部分,我认为这是由于使用非标准字体造成的。

这不是一个解决方案,但如果您无法阻止它,您只需将网页向上或向下滚动 1 个像素即可删除这些小混蛋。

您还使用过时的 jQuery 版本(1.3 而不是 1.6.2),这有什么原因吗?如果没有,您应该使用最新版本

I only see the leftovers of the animation in the H1 which I think is caused by using a non standard font.

It's not a solution but if you can't prevent it, you can remove those little bastards by just scrolling the webpage 1 pixel up or down.

You're also using an outdated version of jQuery (1.3 instead of 1.6.2), is there a reason for this? If not, you should use the latest version

等待我真够勒 2024-12-04 00:21:05

@font-face 文本左侧的轨迹在 Chrome 和 Chrome 中使用 left 属性进行动画处理。野生动物园。我发现使用文本上留下的一些填充并调整动画以适应可以解决问题。

Trails on the left side of @font-face text animated using the left property in Chrome & Safari. I found that using some padding left on the text and adjusting the animation to accomodate fixed the problem.

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