谷歌浏览器的背景换挡时的不透明度悬停改变 [英] Background shift in Google Chrome when opacity changes on hover

查看:249
本文介绍了谷歌浏览器的背景换挡时的不透明度悬停改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个悬停效果设置与jQuery改变了徘徊元素的透明度。它的工作原理在最近所有的浏览器很好,除了浏览器,在那里它改变人体元素的背景。

I have a hover effect set up with Jquery that changes the opacity of the hovered element. It works fine in all recent browsers, except for Chrome, where it shifts the body elements' background.

下面的链接: http://wrong.ro/tataia/

我的工作环境如下:谷歌浏览器v18.0.1025.162 / Windows 7的64

My work environment is as follows: Google Chrome v18.0.1025.162 / Windows 7 x64.

对此有什么解决办法?在此先感谢!

Is there any workaround for this? Thanks in advance!

推荐答案

我经历的东西非常接近这一点,在我的情况改变悬停不透明造成了前景图像元素摆动。它看起来像特定的原因与使用变换(我是用)。此修复程序很简单 - 有问题的img元素我加的:

I experienced something very close to this, in my case changing the opacity on hover caused a foreground image element to wiggle. It looks like the particular cause is related to using transform (which I was using). The fix was simple - on the img element in question I added:

-webkit-backface-visibility: hidden;

没有更多的回旋。我不熟悉这个东西实际上做,但它并没有任何奇怪的副作用,解决了这一问题。

No more wiggle. I'm not familiar with what this actually does, but it didn't have any weird side effects and fixed the problem.

我也看到了一个替代的解决方案,我没有尝试 - apparantly其他人都有这样的经历,并与旋转固定的:

I also saw an alternate solution that I didn't try - apparantly other people have experienced this and fixed it with rotate:

-webkit-transform: rotate(0);
-moz-transform: rotate(0);
transform: rotate(0);

这篇关于谷歌浏览器的背景换挡时的不透明度悬停改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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