Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Created March 15, 2017 16:25
Show Gist options
  • Save fernandiez/9add4be2811e0e18c23d2cb6c75e81e8 to your computer and use it in GitHub Desktop.
Save fernandiez/9add4be2811e0e18c23d2cb6c75e81e8 to your computer and use it in GitHub Desktop.
CSS3 Grayscale filter Property
// filter:
// none | blur(px) | brightness(%) | contrast(%) | drop-shadow(h-shadow v-shadow blur spread color) |
// grayscale(%) | hue-rotate(deg) | invert(%) | opacity(%) | saturate(%) | sepia(%) | url();
// initial inerit
.class .class img {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
}
.class img:hover {
-webkit-filter: none;
filter: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment