悬停时不透明度的变化会产生图像偏移或失真

时间:2014-02-12 02:51:36

标签: css image opacity

我有jsfiddle here表示使用a:hover,更改不透明度会移动(或扭曲)图像。

这在Firefox中可见。

有人可以解释可能发生的事情以及如何防止图像变化吗?提前谢谢。

1 个答案:

答案 0 :(得分:10)

我在this so post找到了答案。

对我来说,解决方案是在img

上使用以下内容
-webkit-transform: rotate(0);
-moz-transform: rotate(0);
transform: rotate(0);
-webkit-backface-visibility: hidden;