如何使用javascript在svg文本元素上设置glyph-orientation-horizontal属性?
如何使用javascript在svg文本元素上设置glyph-orientation-horizontal属性 我试过了如何使用javascript在svg文本元素上设置glyph-orientation-horizontal属性?,javascript,html,css,text,svg,Javascript,Html,Css,Text,Svg,如何使用javascript在svg文本元素上设置glyph-orientation-horizontal属性 我试过了 svg.setAttribute(“样式”,“字形方向水平:90”) 也试过了 svg.style.glyph方向水平=90 第一个清除所有样式值,以便style='第二个抛出javascript错误 svg定义为 var svg=document.createElements(“http://www.w3.org/2000/svg“,“svg”) 是否需要在容器svg的所有
svg.setAttribute(“样式”,“字形方向水平:90”)代码>
也试过了
svg.style.glyph方向水平=90代码>
第一个清除所有样式值,以便style='
第二个抛出javascript错误
svg定义为
var svg=document.createElements(“http://www.w3.org/2000/svg“,“svg”)代码>
是否需要在容器svg的所有子文本元素上单独设置值?或者我可以在容器svg上设置值,文本元素将继承该值吗
如有任何建议,将不胜感激
谢谢,
christopher连字符变成camelCase:
svg.style.glyphOrientationHorizontal = 90
连字符变为camelCase:
svg.style.glyphOrientationHorizontal = 90
啊。。。很高兴知道。工作得很好。啊。。。很高兴知道。工作得很好。