当前位置: 首页 > 文档资料 > Emmet 中文文档 >

编码 / 解码图像为 data:URL

优质
小牛编辑
140浏览
2023-12-01

HTML and CSS allows you to embed external resources right into base using data:URL scheme. Usually, image conversion to base64 is done with external on-line services or third-party assets builder.

HTML 与 CSS 可以用 data:URL 插入外部资源。通常用在线服务或第三方软件将图像转换为 base64。

But these tools have downsides: you have to spend extra time on on-line tools or loose control on images that should or should not be converted to base64.

但是这些工具有缺点:在线工具要花费额外的时间,或者不能控制图片是否应该转换为 base64。

With Emmet, you can convert image to data:URL right in your editor, as well as convert it back to external file.

使用 Emmet 在编辑器里就可以将图像转换为 base64,或者相反操作。