How do I use javascript to set the glyph-orientation-horizontal property on an svg text element?
I have tried
svg.setAttribute("style","glyph-orientation-horizontal:90");
and also tried svg.style.glyph-orientation-horizontal=90;
the first clears all style values so that style=''
the second throws a javascript error
svg is defined as var svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
Do I need to individually set the value on all child text elements of the container svg? Or can I set the value on the container svg and the text elements will inherit that value?
Any suggestions would be appreciated.
Thanks, christopher
连字符变成骆驼
svg.style.glyphOrientationHorizontal = 90
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.