Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save amandoabreu/e17a4f51fcfc76053eb2 to your computer and use it in GitHub Desktop.
Save amandoabreu/e17a4f51fcfc76053eb2 to your computer and use it in GitHub Desktop.
Css image mask to create gritty overlays
<div>
<h1>Gritty Grit</h1>
</div>
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