Skip to content

Instantly share code, notes, and snippets.

@csssecrets
Last active September 19, 2021 15:21
Show Gist options
  • Save csssecrets/0dced2852818c0f555e9 to your computer and use it in GitHub Desktop.
Save csssecrets/0dced2852818c0f555e9 to your computer and use it in GitHub Desktop.
Color tinting — with blending modes
/**
* Color tinting — with blending modes
*/
.tinted-image {
width: 640px; height: 440px;
background-size: cover;
background-color: hsl(335, 100%, 50%);
background-blend-mode: luminosity;
transition: .5s background-color;
}
.tinted-image:hover {
background-color: transparent;
}
<div style="background-image:url(http://csssecrets.io/images/tiger.jpg)" class="tinted-image"></div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment