我有一张嵌入式SVG图像,我将其用作背景,以下是一个简化的示例:
div {
width: 100%; height: 500px;
color: green;
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><path d='M0 0 H 100 V 100 H 0 Z' fill='currentColor'></path></svg>");
}
问题在于图片没有继承currentColor, 而当我期望它是绿色时它是黑色的。有什么想法吗?