Skip to content

Instantly share code, notes, and snippets.

@antfu
Last active November 15, 2016 19:40
Show Gist options
  • Save antfu/e7028c3c924ed18473bb06377d53643f to your computer and use it in GitHub Desktop.
Save antfu/e7028c3c924ed18473bb06377d53643f to your computer and use it in GitHub Desktop.
[CSS] Disable antialising when scaling images
img {
image-rendering: optimizeSpeed; /* STOP SMOOTHING, GIVE ME SPEED */
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /* Chrome (and eventually Safari) */
image-rendering: pixelated; /* Chrome */
image-rendering: optimize-contrast; /* CSS3 Proposed */
-ms-interpolation-mode: nearest-neighbor; /* IE8+ */
}
/* From http://stackoverflow.com/questions/14068103/disable-antialising-when-scaling-images */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment