Skip to content

Instantly share code, notes, and snippets.



Created Jun 12, 2012
What would you like to do?
css3 image mask
I had a background image that I wanted to apply border-radius to-- which you can't do to a background image. masks to the rescue! I opted for a method that didn't require an image mask overlay.
radial gradient params: (x/y positioning, width/height, how sharp you want the edges to be, dont mess with last value)
-webkit-mask-box-image: -webkit-radial-gradient(19px 19px, 19px 19px, black 92%, transparent 100%)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment