Question: can svg have transparent background?
Answer: 2 Answers. 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 . ... For a transparent rect you want to add fill="none" .