Created
August 7, 2013 09:42
-
-
Save kogakure/6172657 to your computer and use it in GitHub Desktop.
CSS: Mask with -webkit-mask and adding a border with second mask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div> | |
| <img class="cutout" src="http://jedidiah.eu/code/css/masks/images/periwinkle.jpg" alt=""> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| div { | |
| background: red; | |
| -webkit-mask-image: -webkit-radial-gradient(center ellipse cover, #000 0, #000 105px, transparent 106px, transparent 254px); | |
| -webkit-mask-position: 88px 7px; | |
| -webkit-mask-repeat: no-repeat; | |
| -webkit-mask-size: 254px 254px; | |
| } | |
| .cutout { | |
| -webkit-mask-image: -webkit-radial-gradient(center ellipse cover, #000 0, #000 100px, transparent 102px, transparent 250px); | |
| -webkit-mask-position: 90px 10px; | |
| -webkit-mask-repeat: no-repeat; | |
| -webkit-mask-size: 250px 250px; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment