+ 2

WHY Dose This Not Work

<svg width="2000" height="2000"> <rect width="300" height="100" x="20" y="20" fill=url("http://hdwallpaperdaily.com/wp-content/uploads/2013/12/christmas-wrapping-paper-wallpaper.jpg" )/> </svg>

2nd Feb 2017, 11:33 AM
Ian
Ian - avatar
2 Answers
+ 4
To integrate an image file as 'fill' attribute, you need make it into a pattern: <defs> <pattern id="pic" patternUnits="useSpaceOnUse" width="300" height="100"> <img xlink:href="url_of_image_file" x="0" y="0" width="300" height="100" /> </pattern> </defs> <rect width="300" height="100" x="20" y="20" fill="url(#pic)" />
2nd Feb 2017, 12:38 PM
visph
visph - avatar
+ 1
thanks
2nd Feb 2017, 12:39 PM
Ian
Ian - avatar