我有下一个代码
var title = 'hello<sup>2</sup>';
现在我正在使用谷歌图表,我希望它2
显示为上标。
我明白了
hello<sup>2</sup>
标题上的代码是
<text text-anchor="start" x="148" y="52.9" font-family="Arial" font-size="14" font-weight="bold" stroke="none" stroke-width="0" fill="#000000">Hello<sup>2</sup></text>
这是在svg上,现在我试过了,下一个
var title = 'hello<text style="vertical-align: super">2</text>';
但我明白了
hello<text style="vertical-align: super">2</text>
关于如何将2
作为上标的任何想法?