CSS内联Base64图像的CSS

时间:2013-09-15 12:00:51

标签: html css

这是我的代码:

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

我已将背景“paper.png”转换为Base64,我想将其嵌入到那里。有没有办法做到这一点?

我试过了:

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

但这不起作用。

1 个答案:

答案 0 :(得分:4)

如果您使用正确的CSS,这应该有效:

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

在CSS中:

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