Skip to content

Instantly share code, notes, and snippets.

@stammy
Created June 12, 2012 07:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stammy/2915921 to your computer and use it in GitHub Desktop.
Save stammy/2915921 to your computer and use it in GitHub Desktop.
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