Skip to content

Instantly share code, notes, and snippets.

@kaspereden
Last active August 29, 2015 14:25
Show Gist options
  • Save kaspereden/42347bdb1b7edc38aa2b to your computer and use it in GitHub Desktop.
Save kaspereden/42347bdb1b7edc38aa2b to your computer and use it in GitHub Desktop.
Untitled
div { width: 250px }
<div><svg version="1.1" id="subhomes" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 430.6 408.2" xml:space="preserve"> <defs> <clipPath id="myClippingPath"> <path style="fill:#000000;fill-opacity:1.000000;stroke:#000000;stroke-width:1.000000px;stroke-opacity:1.000000;stroke-linecap:butt;stroke-linejoin:miter;" d="M 143.100006,27.600000 C 81.199997,56.400002 30.799999,108.800003 11.800000,171.600006 C -0.800000,213.199997 2.400000,253.000000 18.000000,286.399994 C 41.000000,335.600006 90.900002,370.899994 157.300003,377.299988 C 157.699997,377.299988 158.100006,377.500000 158.300003,377.799988 C 158.500000,378.100006 158.600006,378.500000 158.500000,378.899994 C 158.500000,378.899994 149.899994,407.399994 149.899994,407.399994 C 190.199997,411.000000 231.300003,402.500000 268.899994,385.000000 C 334.799988,354.299988 389.799988,295.700012 411.100006,225.199997 C 425.500000,177.500000 422.100006,132.100006 404.799988,95.000000 C 381.700012,45.599998 333.799988,10.700000 270.100006,4.600000 C 226.699997,0.400000 182.600006,9.200000 143.100006,27.600000 " /> </clipPath> </defs> <!-- the element you want to apply the clipPath to can be any SVG element --> <g id="my-graphic" clip-path="url(#myClippingPath)"> <image width="100%" height="100%" xlink:href="http://lorempixel.com/400/400" /> </g></svg></div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment