将图片嵌入HTML [英] Embed a picture in HTML
本文介绍了将图片嵌入HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我有这个HTML字符串.我想将图像嵌入HTML内容中,以便将来如果我从 D:/Icons/Logic/sign_up_16.png 中删除图像,那么我仍然可以使用保存的HTML字符串并获取图片.
< P>
< SPAN style ="COLOR:#24ea51">
< IMG src ="file:///D:/Icons/Logic/sign_up_16.png">
Rahul</SPAN>
</P>
谢谢
Hello
I have this HTML string. I want to embed the image in the HTML content so that if in future if i will delete the image from D:/Icons/Logic/sign_up_16.png then still i can use the saved HTML string and get the image.
<P>
<SPAN style="COLOR: #24ea51">
<IMG src="file:///D:/Icons/Logic/sign_up_16.png">
Rahul</SPAN>
</P>
Thanks
推荐答案
只有这样,我知道要起作用的唯一方法是将图片嵌入为Base64编码的文本.
您可以查看有关如何在html中嵌入Base64图像的本教程: http://www.websiteoptimization.com/speed /tweak/inline-images/ [^ ]
Tha only way I know for this to work is to embed the picture as Base64 encoded text.
You can see this tutorial on how to embed Base64 images in html: http://www.websiteoptimization.com/speed/tweak/inline-images/[^]
这篇关于将图片嵌入HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文