SVG transparent background web

transparent is not part of the SVG specification, although many UAs such as Firefox do support it anyway. The SVG way would be to set the stroke to none, or alternatively set the stroke-opacity to 0.

You also don’t set any value for fill on the <rect> element and the default is black. For a transparent rect you want to add fill="none".

Leave a Comment