在React中选择SVG元素的属性“ id”

时间:2018-10-09 20:40:10

标签: reactjs svg

如何选择SVG元素的“ g”属性“ id”:如下面在react中提到的“ SvgElement”

喜欢:

<svg id="L_1" data-name="L 1" xmlns="http://www.w3.org/2000/svg" width="1920" height="720" viewBox="0 0 920 420">

    <rect id="Background" width="1920" height="720" fill="none"/>

    <g id="SvgElement">
        <circle cx="200" cy="100" r="50"/>
    </g>
</svg>

0 个答案:

没有答案
相关问题