Skip to content

Instantly share code, notes, and snippets.

@bttq
Created August 28, 2012 08:41
Show Gist options
  • Select an option

  • Save bttq/3496245 to your computer and use it in GitHub Desktop.

Select an option

Save bttq/3496245 to your computer and use it in GitHub Desktop.
CSS Mask
/**
* CSS Mask
*/
body {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
height: 500px;
margin-top: 5%;
text-align: center;
}
div {
display: inline-block;
width: 200px;
height: 45px;
margin: 0 20px;;
box-shadow: rgba(0,0,0,.5) 0 1px 2px;
background-color: #e00;
border: 1px solid #EEE;
}
div.mask {
-webkit-mask-image: url(http://cl.ly/image/172B2d2s0T0J/mask.png);
;
}
div:after {
content: "";
width: 200px;
height: 45px;
}
<div></div><div class="mask"></div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment