Embedding Base64 Images
Purely out of curiosity, which browsers does Base64 image embedding work in? What I'm referring to is this.
I realize it's not usually a good solution for most things, as it increases the page size quite a bit - I'm just curious.
Some examples:
HTML:
<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />
CSS:
div.image {
width:100px;
height:100px;
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA...);
}
Update: 2017-01-10
Data URIs are now supported by all major browsers. IE supports embedding images since version 8 as well.
http://caniuse.com/#feat=datauri
Data URIs are now supported by the following web browsers:
http://en.wikipedia.org/wiki/Data_URI_scheme#Web_browser_support
Most modern desktop browsers such as Chrome, Mozilla and Internet Explorer support images encoded as data URL. But there are problems displaying data URLs in some mobile browsers: Android Stock Browser and Dolphin Browser won't display embedded JPEGs .
I reccomend you to use the following tools for online base64 encoding/decoding:
Encode to Base64 format
Decode from Base64 format
Check the "Format as Data URL" option to format as a Data URL.
我可以使用(http://caniuse.com/#feat=datauri)在主要浏览器上显示对IE浏览器很少问题的支持。
链接地址: http://www.djcxy.com/p/47036.html上一篇: Safari嵌入了SVG文档类型
下一篇: 嵌入Base64图像