Default background color of SVG root element

后端 未结 6 1133
一生所求
一生所求 2020-11-29 17:30

I\'d like to set a default background color for the entire SVG document, to red for example.

/*          


        
6条回答
  •  爱一瞬间的悲伤
    2020-11-29 18:19

    It is the answer of @Robert Longson, now with code (there was originally no code, it was added later):

    
    
     
    

    This answer uses:

    • https://stackoverflow.com/a/11293812/6747994
    • https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes

提交回复
热议问题