Do HTML email templates require the use of the style attribute?

此生再无相见时 提交于 2019-12-11 03:32:25

问题


Are there scenarios where it is (for some reason) required to place the CSS rule inside the style attribute of the HTML tag directly instead of placing the CSS rule inside a selector in the STYLE element in the HEAD of the HTML email template?

(I am asking for the most common CSS selectors, like type, class, ID, descendant combinations)

Follow-up question:

Gmail seems to be the only relevant email service that does not support the STYLE element. Why is that? (What's the reasoning behind this decision from Google?)


回答1:


Yes, for example google gmail won't handle the STYLE element in the HEAD.

Look at this site for email clients and what they can/can't do regarding css: http://www.campaignmonitor.com/css/



来源:https://stackoverflow.com/questions/4014600/do-html-email-templates-require-the-use-of-the-style-attribute

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!