I dynamically load multiple external SVG documents in an HTML page and attach them inline.
But the lineargradient defined in the first SVG file "pollute" lineargradient defined with the same id in subsequent SVG files. It means the first loaded lineargradient defined with an ID override other lineargradient defined with the same id in other files.
Any idea on how to sandbox inline SVG when there are multiple SVG inlined in an HTML page ?
Note : when using embed tag around the SVG tags, they do not "pollute" each other
以上就是Multiple SVG document loaded dynamically in an HTML page的详细内容，更多请关注web前端其它相关文章！