如何在电子邮件中的图片上写文字(inline css)



我在邮件中创建了一个html设计,这个代码在任何浏览器中都可以工作,但我尝试了电子邮件设计,但它不起作用。你能帮我吗?

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting">
</head>
<body>
<div style="position: absolute;">
<img style="position: static; width: 550px;"
src="imageUrl" alt="sss"/>
</div>

<h1 style="position: absolute; color: black; margin-top: 120px; margin-left: 150px;">Person name</h1>
</body>
</html>

我试过了,

table background and body background. Doesn't work.

我需要显示我的图像和文本。但这行不通。它只显示我的文本。实际上css代码可以工作,但是图像看起来是单独的图像。文字应该出现在图片上。

我尝试了多种方法。Gmail, Outlook等。我见过邮件提供程序阻止css代码。谢谢你的评论。这就是为什么我要使用简单的背景。

相关内容

最新更新