【发布时间】:2019-03-13 00:48:09
【问题描述】:
我想根据外部变量的值动态生成一个 svg,
例如如果html页面变量lang设置为“eng”, 将显示文本“Circle”,否则将显示具有相应语言的文本。
<svg height="300" width="100">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="green" />
<text x = "50" y="150">Circle</text>
</svg>
有什么建议吗?
谢谢大家!!
【问题讨论】:
-
您可以使用switch element