作者:U友50082089 | 来源:互联网 | 2023-09-23 14:09
IhaveabunchofSVGimagesthatIwanttoembedinanHTMLpage,whichisstyledwithCSS.我有一堆SVG
I have a bunch of SVG images that I want to embed in an HTML page, which is styled with CSS.
我有一堆SVG图像,我想嵌入一个HTML页面,用CSS设置样式。
I want to be able to have elements in the SVG have their color inherited from the parent HTML element's color attribute.
我希望能够让SVG中的元素的颜色继承自父HTML元素的颜色属性。
I tried setting
but this doesn't work.
我尝试设置style =“stroke:none; fill:inherit”但这不起作用。
2 个解决方案