SVG not displaying
I have a function that returns an SVG element like so:
That code works fine with the VS code live server. But when I use it in a local dev server, the
this is my CSS code:
NOTE:
in the VS code live server, the SVG element is hardcoded into the HTML, it is not rendered by a JavaScript function, but the SVG element code is identical in both cases.
Any idea what could be doing wrong?
Thanks in advance.
That code works fine with the VS code live server. But when I use it in a local dev server, the
<path> and <polygon> elements' width and height become 0.this is my CSS code:
NOTE:
in the VS code live server, the SVG element is hardcoded into the HTML, it is not rendered by a JavaScript function, but the SVG element code is identical in both cases.
Any idea what could be doing wrong?
Thanks in advance.
