Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

svg images and making the background transparent

Tags:

background

svg

How do you declare the background of an svg script image to be transparent?

like image 724
SK9 Avatar asked Jun 23 '11 02:06

SK9


1 Answers

If you're viewing in a browser then the background should be transparent automatically. At least it is in FF4 and the latest version of Chrome, but not in some older browsers (e.g. http://petercollingridge.co.uk/data-visualisation/mouseover-effects-svgs).

If you want the background to be semi-transparent then fill the space with a <rect> and set its opacity to a number between 0 and less than 1.

like image 132
Peter Collingridge Avatar answered Sep 30 '22 16:09

Peter Collingridge