只需用引导程序邮寄 [英] Simply mail with bootstrap
问题描述
我有一封简单的邮件要发送
I have a simply mail I want to send
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css">
<div class="card">
<div class="card-header">
<nav class="navbar bg-primary">
<a class=" navbar-brand " href="# ">
<img alt=" " class="d-inline-block align-top " src="img/logo.png ">
</a>
</nav>
</div>
<div class="card-body ">
<h5 class="card-title ">Welcome</h5>
<p class="card-text ">To complete the registration you must click on the following link.</p>
<button class="btn btn-primary" href="{{registrationURL}} ">
Complete registration
</button>
</div>
</div>
但是我读到某处无法将引导程序直接添加到电子邮件中....是真的吗?
but I read somewhere it's not possible to add the bootstrap directly in the email.... It's true or not?
我已经在一些客户中尝试过了,并且可以使用,但是我不知道我是否会和其他客户有问题.
I have tried in some clients and it's works, but I don't know if I will have problem with others.
推荐答案
该电子邮件需要将所有CSS都包含在html代码中,以实现良好的行为,而不是试图从外部文件中获取CSS.我建议您例如从MailChimp获取电子邮件模板.您会注意到,他们将所有的CSS代码都放在同一模板中.
The email needs all the css to be included inside the html code for a good behavior not trying to get the css from external files. I recommend you to get the email template from MailChimp for example. You will notice that they put all the css code inside in the same template.
MailChimp模板会小心地在所有浏览器中以及在Outlook程序(仍然非常使用)中正确显示该模板.
MailChimp templates take care to show properly the template in all browsers and also with Outlook program (still being very used).
这篇关于只需用引导程序邮寄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!