我想为svg的背景着色,text类似于background-colorcss
我只能找到文档fill,为文本本身着色
它甚至可能吗?
我在SVG中有一个代码:
<svg width="100%" height="100%" version="1.1"xmlns="http://www.w3.org/2000/svg">
<rect x="20" y="20" width="250" height="250" style="fill:blue">
<animate attributeType="CSS" attributeName="opacity" from="1" to="0" dur="5s" repeatCount="indefinite" />
</rect>
</svg>
Run Code Online (Sandbox Code Playgroud)
现在我需要在此之间添加一个文本rectangle.谁能告诉我怎么做?