I have an SVG file that I checked by opening it in an image viewer.
I tried to add this SVG to the HTML file using javascript code
d3.xml("assets/abc.svg", function(xml) { document.body.appendChild(xml.documentElement); });
I am checking the HTML source and I can see that SVG is added to the HTML. But SVG is not displayed on the page. Any idea what could be the reason?
Note:
It works fine for me in IE / FF / CH. I have a valid svg, with the following in my root svg:
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" ...>
, , , svg . , , svg , display = "none" viewBox
HTML- , "" Chrome dev svg "display" (), "", "", "" () "" ( > 0). -, ( ), , DOM node "". , - / SVG.
, "fill" "stroke" svg.
Source: https://habr.com/ru/post/1532814/More articles:Is there a way to search ALL mercurial commits for a particular string? - version-controlОбъект AttributeError 'tuple' не имеет атрибута 'get' - pythonPandas, build a new dataframe with a for loop - pythonPerformance Cypher SORT - neo4jJQuery Number of numbers in an array - jqueryRegex possesive quantifier - javaКак я могу сопоставить определенный формат ввода с помощью java.util.regex в java? - javaКак установить условие pdb break из исходного кода? - pythonCan we publish the value of the “Unverified radio station” button? - htmlonActivityResult in dialog fragment - androidAll Articles