简体   繁体   English

JSP中的内联CSS

[英]Inline CSS in JSP

I'm designing email, and we're using JSP for HTML generation. 我正在设计电子邮件,我们正在使用JSP生成HTML。 To maximize compatibility with various clients, inline CSS should be used; 为了最大程度地与各种客户端兼容,应使用内联CSS。 however, it's very hard to maintain. 但是,很难维护。

Is there any "proper" way of inlining styles in JSP from head or external css file except for using other preprocessors (ie tasks for Gulp or Grunt)? 除了使用其他预处理器(即Gulp或Grunt的任务)以外,是否有任何“适当”的方法可以从头文件或外部CSS文件内联JSP中的样式?

if you use CSS linked file then there is a chance that some email clients might block them. 如果使用CSS链接文件,则某些电子邮件客户端可能会阻止它们。

The most reliable way to include CSS in an HTML email is to use inline styles. 在HTML电子邮件中包含CSS的最可靠方法是使用内联样式。 They aren't pretty, but few email clients ignore them. 它们不是很漂亮,但是很少有电子邮件客户端忽略它们。

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

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