[英]Inline CSS in HTML emails
What the best practice for styling an email campaign is.设计 email 广告系列的最佳做法是什么。 Should I be adding all of my inline CSS in the body?我应该在正文中添加我所有的内联 CSS 吗? Or should I be Adding styles in my head and referencing them with classes?或者我应该在脑海中添加 styles 并用类引用它们?
I have already ruled out linking an external CSS document since most email clients do not support <link>
.我已经排除了链接外部 CSS 文档的可能性,因为大多数 email 客户端不支持<link>
。
the best practice is to apply the style in head tag, since that have a styling hierarchy than the inline-CSS and this will make your code readable and clean, but also if you are using third party CSS library like tailwindCss you will be using the inline-styling so if not using any third party CSS library stick with inline最佳实践是在 head 标签中应用样式,因为它的样式层次结构比 inline-CSS 的样式层次结构要好,这将使您的代码可读且干净,而且如果您使用第三方 CSS 库(如 tailwindCss),您将使用内联样式所以如果不使用任何第三方 CSS 库坚持内联
Adding style in head tag.在 head 标签中添加样式。 That best practice if u not using library like tailwind or bootstrap如果您不使用tailwind或bootstrap之类的库,那么最佳实践
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.