There seems to be an issue with my page here: http://www.lonewulf.eu
When hovering over the thumbnails the image moves a bit on the right, and it only happens on Chrome.
My css:
.img{
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
filter:alpha(opacity=50);
-moz-opacity: 0.5;
opacity: 0.5;
-khtml-opacity: 0.5;
display:block;
border:1px solid #121212;
}
.img:hover{
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter:alpha(opacity=100);
-moz-opacity: 1;
opacity: 1;
-khtml-opacity: 1;
display:block;
}
The solution alpipego was served me in this problem. Use
-webkit-backface-visibility: hidden;
With this the image no move in hover opacity transitionAnother solution that fixed this issue for me was to add the rule:
In my particular case this avoided a similar pixel-jumping issue that
translateZ(0)
introduced in Internet Explorer, despite fixing things in Chrome.Most of the other solutions suggested here that involve transforms (eg.
translateZ(0)
,rotate(0)
,translate3d(0px,0px,0px)
, etc) work by handing painting of the element over to the GPU, allowing more efficient rendering.will-change
provides a hint to the browser that has presumably a similar effect (allowing the browser to render the transition more efficiently), but feels less hacky (since it's explicitly addressing the problem rather than just nudging the browser to use the GPU).Having said that, it's worth bearing in mind that browser support is not as good for
will-change
(though if the issue is with Chrome only then this might be a good thing!), and in some situations it can introduce problems of its own, but still, it's another possible solution to this issue.