简体   繁体   中英

CSS inlining a Base64 image

This is my code :

<td height="738" valign="top" width="717" align="center" background="mail_files/paper.png">

I have converted the background "paper.png" to Base64 and I want to embed it there. Is there any way to do it?

I tried :

<td height="738" valign="top" width="717" align="center" background=url("data:image/jpeg;base64,.....Base64img.....">

But this did not work.

This should work if you'll use proper CSS:

<td class="PaperCell" height="738" ...>

And in the CSS:

.PaperCell { background-image: url(data:image/jpeg;base64,.....Base64img.....); }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM