views:

21

answers:

0

Webkit allows the use of an external SVG file as a mask for any HTML element. Ie:

<img src="kate.png" style="-webkit-mask-image: url(circle.svg)">

Resulting in:

(More information here: http://webkit.org/blog/181/css-masks/)

Does anyone know if there's a way to do it without an external SVG file? More specifically, can it be done with SVG generated from javascript?