Last active
September 19, 2021 15:21
-
-
Save csssecrets/0dced2852818c0f555e9 to your computer and use it in GitHub Desktop.
Color tinting — with blending modes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div style="background-image:url(http://csssecrets.io/images/tiger.jpg)" class="tinted-image"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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