如何让IE6显示内嵌的base64编码图像?
<img src="data:image/png;base64,....." />
这适用于Firefox / Chrome / Safari,但不适用于IE6.
解决方法
我的解决方案在IE6上顺利运行.它可能会帮助你!
<!-- Content-Type: multipart/related; boundary="=_data-uri" --> <!DOCTYPE html> <html> <head> <style type="text/css"> #pic { width:670px;height:710px; background-image: expression("url(mhtml:" + window.location + "!locoloco)"); } </style> </head> <body> <div id="pic" ></div> <div id=test style="display: none;"> --=_data-uri Content-Location:locoloco Content-Transfer-Encoding:base64 iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8 /w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== --=_data-uri-- </div> </body> </html>