Created
November 30, 2014 22:41
-
-
Save devdays/0008895d35c06e6cb44d to your computer and use it in GitHub Desktop.
SVG Masking
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Masking</title> | |
</head> | |
<body> | |
<svg version="1.1" viewBox="0 0 100 100"> | |
<defs> | |
<mask id="mask" x="0" y="0" width="100" height="100" | |
maskUnits="userSpaceOnUse"> | |
<circle cx="50" cy="50" r="50" fill="white" /> | |
<circle cx="50" cy="50" r="25" fill="black" /> | |
</mask> | |
</defs> | |
<circle cx="50" cy="50" r="50" fill="blue" mask="url(#mask)" /> | |
</svg> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment