gpt4 book ai didi

css - Chrome 72 是否破坏了 css 背景 svgs 的 'data:image/svg+xml;utf8'?

转载 作者:数据小太阳 更新时间:2023-10-29 01:41:41 25 4
gpt4 key购买 nike

<分区>

我的 svgs 在 css 中指定如下:

background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="18" height="15" viewBox="0 0 18 15"><g fill="none" fill-rule="evenodd" stroke="#00174a"><path d="M11 1l7 6.533L11.07 14M17.5 7.5H.5"/></g></svg>')

这适用于所有浏览器,但自 chrome 72 起,此功能不再适用于 chrome。我在 background 属性中找不到任何关于 data:image 前缀的可靠文档。或来自谷歌的有关此更改的更新。

我知道我可以指定一个 svg 的路径,但我正在使用这种技术来重现具有不同颜色的 svg,这是我需要实现的方法。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com