A Pen by Amando Filipe on CodePen.
Created
February 6, 2015 00:20
-
-
Save amandoabreu/e17a4f51fcfc76053eb2 to your computer and use it in GitHub Desktop.
Css image mask to create gritty overlays
This file contains hidden or 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> | |
<h1>Gritty Grit</h1> | |
</div> |
This file contains hidden or 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{ | |
position: absolute; | |
top: 50%; | |
width:100%; | |
-webkit-transform: translateY(-50%); | |
-ms-transform: translateY(-50%); | |
transform: translateY(-50%); | |
} | |
h1{ | |
font-family:Verdana; | |
text-align:center; | |
font-size:150px; | |
color:green; | |
mask-image: url('https://i.imgur.com/JMIX04V.png'); | |
-webkit-mask-image: url('https://i.imgur.com/JMIX04V.png'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment