Created
December 9, 2014 02:07
-
-
Save charlie-s/1175bf9374dbc83046e7 to your computer and use it in GitHub Desktop.
SVG Polygon Mask
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
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="300px" height="300px" viewBox="0 0 500 500"> | |
<defs> | |
<clipPath id="clip1"> | |
<polygon points="250,20 480,100 480,400 250,480 20,400 20,100"></polygon> | |
</clipPath> | |
</defs> | |
<polygon points="250,20 480,100 480,400 250,480 20,400 20,100" stroke="#aaaa99" stroke-width="30" stroke-linejoin="round"></polygon> | |
<image xlink:href="https://c2.staticflickr.com/4/3650/3513935402_a1d2a3db9b.jpg" width="500" height="500" clip-path="url(#clip1)"></image> | |
</svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment