更新时间:2023-01-23 08:00:19
你可以只创建一个 Image
对象并将 base64 作为它的 src
,包括 >data:image...
部分 像这样:
You can just create an Image
object and put the base64 as its src
, including the data:image...
part like this:
var image = new Image();
image.src = 'data:image/png;base64,iVBORw0K...';
document.body.appendChild(image);
这就是他们所说的数据 URI",这里是 兼容性表,让您内心平静.
It's what they call "Data URIs" and here's the compatibility table for inner peace.