Answer the question
In order to leave comments, you need to log in
How to add g styles?
not inline
, but through js , that is,
initially we
var g = document.createElement('g');
get
<g transform="rotate(-12, 55, 35)"></g>
Answer the question
In order to leave comments, you need to log in
Please clarify your question.
If you add styles via JavaScript, then be prepared for the fact that the styles will be added to the element exactly inline, but programmatically.
var g = document.createElement('g');
g.style = 'color: red; margin: 8px;';
var g = document.createElement('g');
g.classList.add( 'your-css-class' );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question