【发布时间】:2018-09-27 04:02:00
【问题描述】:
我的网页中有一个按钮,我想将其背景图像设置为 base64 编码的数据 URI,如下所示:
<button type="button" disabled="true" style="width: 350px; height: 220px; background-image: url(&quot;data:image/png;base64, Qa=...;);"></button>
上面的按钮适用于 chrome、Firefox 和 IE11,但不适用于 IE9。按钮正在显示,但背景图像未显示。那么如何让它在 IE9 中运行呢?
请注意,所有谷歌搜索结果都显示了如何支持 IE8+ 或 svgs,而我希望在 IE9 中支持 base64 数据 URI。
【问题讨论】:
-
@mplungjan 我不需要支持ie7及以下,只支持ie9及以上
-
@mplungjan 和 IE 11 工作
-
可能使用相同的方法 - 我认为 IE10 不是
标签: html css internet-explorer-9 data-uri