Skip to content

Instantly share code, notes, and snippets.

@LeaVerou
Created May 11, 2012 14:18
Masking an image with a gradient (answer to question)
/**
* Masking an image with a gradient (answer to question)
*/
div {
width: 200px; height: 200px;
background: linear-gradient(white, hsla(0,0%,100%,0)),
url(http://placekitten.com/200/200);
}
{"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