Html 使用 Bootstrap 设计电子邮件模板

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/33687048/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 18:29:26  来源:igfitidea点击:

Email Template Design with Bootstrap

htmltwitter-bootstrapemail

提问by Muhammad Hasham

I have to create a responsive email template design. I have been designing for a while, but never had a chance to create email templates.

我必须创建一个响应式电子邮件模板设计。我已经设计了一段时间,但从未有机会创建电子邮件模板。

Can I use Bootstrap to create email templates, just like I would using a normal web-page with containers, rows and columns?

我可以使用 Bootstrap 创建电子邮件模板,就像使用带有容器、行和列的普通网页一样吗?

If not, are there any specific tutorials, templates or considerations that I need to keep in mind?

如果没有,是否有任何特定的教程、模板或注意事项需要我牢记?

回答by asp

回答by Abhay Pai

I would not recommend using any 3rd party CSS framework as you will have to load the entire CSS file which is not supported by some of the Email Clients.

我不建议使用任何 3rd 方 CSS 框架,因为您必须加载某些电子邮件客户端不支持的整个 CSS 文件。

Rather you can use the table system in vanilla HTML along with the use of frameworks like SASS or LESS which will compile into CSS that you can add up in the DOM itself.

相反,您可以在普通 HTML 中使用表格系统,并使用 SASS 或 LESS 等框架,这些框架将编译成 CSS,您可以将其添加到 DOM 本身中。