简体   繁体   English

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

[英]How can I write a text on a picture in an e-mail (inline css)

I create an html design in mail this code works in any browser but I try email design but it doesn't work.我在邮件中创建了一个 html 设计,此代码适用于任何浏览器,但我尝试了 email 设计,但它不起作用。 Can you help me?你能帮助我吗?

<!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>

I've tried;我试过了;

table background and body background. Doesn't work.

I need to show my image and text.我需要显示我的图像和文字。 But it's not working.但它不起作用。 It just shows my text.它只显示我的文字。 Actually the css code works, but the image looks separate image.实际上 css 代码有效,但图像看起来是单独的图像。 Text should appear on the picture.文字应该出现在图片上。

I tried multiple methods.我尝试了多种方法。 Gmail, Outlook etc. I've seen mail providers block css codes. Gmail、Outlook 等。我见过邮件提供商阻止 css 代码。 Thanks for the comment.感谢您的评论。 That's why I'm going to use simple backgrounds.这就是为什么我要使用简单的背景。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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