简体   繁体   English

通过电子邮件发送 html 时 box-shadow 不起作用

[英]box-shadow is not working when sending html by email

I am using html to send email.我正在使用 html 发送电子邮件。 Due to the blocking of images by most providers, I'm using box-shadow to draw the image I need.由于大多数供应商阻止图像,我使用 box-shadow 来绘制我需要的图像。 However, in the browser appears normal, but in the email nothing appears.但是,在浏览器中显示正常,但在电子邮件中什么也没出现。 Am I doing something wrong?难道我做错了什么? Any alternative?有什么替代方案吗?

 </head> <body style="height: 100%;width: 100%;"> <div class="pixels" style="border-radius: 0;display: inline-block;width: 1px;height: 1px;box-shadow: 0px 0px rgba(228,232,233,1),0px 1px.......;"><p> teste</p> </div></body> </html>

A lot of providers don't support box-shadow.许多提供商不支持box-shadow。 List here在这里列出

It worked better than converting the image to base64.它比将图像转换为 base64 效果更好。 For some reason, some base64 images appeared binary code, and only appeared when you clicked "view full message" (in gmail).出于某种原因,一些 base64 图像显示为二进制代码,并且仅在您单击“查看完整消息”(在 gmail 中)时才会出现。 Using the inline image this problem has been solved.使用内嵌图像这个问题已经解决。 Thanks a lot for the help.非常感谢您的帮助。 I no longer knew what to do, I did not think that possibility.我不再知道该怎么做,我不认为有这种可能性。 I had tried including, as explained at the beginning, using css (codepen.io/emad_elsaid/full/bCaLE), but as informed, you can not use box-shadow in emails.正如开头所解释的,我曾尝试使用 css (codepen.io/emad_elsaid/full/bCaLE),但据悉,您不能在电子邮件中使用 box-shadow。 Thankful.谢天谢地。

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

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