Skip to content

Instantly share code, notes, and snippets.

@sonnyprince
Created October 29, 2014 09:34
Show Gist options
  • Save sonnyprince/5a681f381dfa10df345a to your computer and use it in GitHub Desktop.
Save sonnyprince/5a681f381dfa10df345a to your computer and use it in GitHub Desktop.
Mixin to stop image hover jitter with opacity
@mixin imageOpacityFix() {
-webkit-transform: rotate(0);
-moz-transform: rotate(0);
-o-transform: rotate(0);
transform: rotate(0);
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
}
img{
@include imageOpacityFix();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment