Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用javascript在svg文本元素上设置glyph-orientation-horizontal属性?_Javascript_Html_Css_Text_Svg - Fatal编程技术网

如何使用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的所有

如何使用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上设置值,文本元素将继承该值吗

如有任何建议,将不胜感激

谢谢,
christopher

连字符变成camelCase:

svg.style.glyphOrientationHorizontal = 90

连字符变为camelCase:

svg.style.glyphOrientationHorizontal = 90

啊。。。很高兴知道。工作得很好。啊。。。很高兴知道。工作得很好。