[英]How do I use javascript to set the glyph-orientation-horizontal property on an svg text element?
如何使用javascript在svg文本元素上设置glyph-orientation-horizontal属性?
我努力了
svg.setAttribute("style","glyph-orientation-horizontal:90");
并且还尝试了svg.style.glyph-orientation-horizontal=90;
第一个清除所有样式值,以便style=''
,第二个清除javascript错误
svg定义为var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
我是否需要对容器svg的所有子文本元素分别设置值? 还是可以在容器svg上设置值,文本元素将继承该值?
任何建议,将不胜感激。
谢谢克里斯托弗
连字符变成骆驼
svg.style.glyphOrientationHorizontal = 90
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.