Hello everyone, finally the end of the working week! And again the question about SVG ( Scalable Vector Graphics ) - I draw a rectangle (width 93mm, height 53mm) with the help of SVG, using this XML markup:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" width="93mm" height="53mm"> <rect x="0" y="0" width="93mm" height="53mm" stroke="black" stroke-width="2px" fill="white" /> </svg> 

Then everything else is drawing inside this rectangle. Attention is the question - what do I need to write in the property fill = "", instead of white, to fill the rectangle not with white , but to make it transparent ?

    2 answers 2

    To set the transparency of the shape fill, the additional attribute fill-opacity is used in SVG. In addition, there are related attributes: stroke-opacity - for determining the transparency of the lines, and opacity - for determining the overall transparency.

    • Thank you, I will now accept your answer as the best. Now I will try to use the method proposed by you! - spoilt

    I googled well and found such a thing: if you specify the fill="none" property, then the shape should be transparent, although I'm not 100% sure.

     <rect x="0" y="0" width="93mm" height="53mm" stroke="black" stroke-width="2px" fill="none" />