zefs zefs - 1 year ago 160
CSS Question

image moves on hover - chrome opacity issue

There seems to be an issue with my page here:

When hovering over the thumbnails the image moves a bit on the right, and it only happens on Chrome.

My css:

-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
-moz-opacity: 0.5;
opacity: 0.5;
-khtml-opacity: 0.5;
border:1px solid #121212;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
-moz-opacity: 1;
opacity: 1;
-khtml-opacity: 1;

Answer Source

Another solution would be to use

-webkit-backface-visibility: hidden;

on the hover element that has the opacity. Backface-visibility relates to transform, so @Beskow's has got something to do with it. Since it is a webkit specific problem you only need to specify the backface-visibility for webkit. There are other vendor prefixes.

See http://css-tricks.com/almanac/properties/b/backface-visibility/ for more info.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download