Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fill SVG element with with a background-image with an offset

I want to do something similar to this Fill SVG path element with a background-image

However, I want to shift/offset the image. With CSS, it can easily done by setting background-image and background-position. How do I do it with SVG?

like image 424
jpbochi Avatar asked Mar 08 '11 23:03

jpbochi


1 Answers

You can use patternTransform on the pattern element to transform the pattern; it works just like the transform attribute you may already be familiar with. See the documentation for details.

like image 133
Anomie Avatar answered Sep 17 '22 11:09

Anomie