Gmail是否支持CSS类? [英] Does Gmail support CSS classes?
问题描述
标题实际上只是问题的缩写版本。我知道Gmail的CSS支持有限,但我正在阅读电子邮件中的CSS支持指南 ,其中有Gmail支持 .class
和 #id
选择器的注释:
The title is really just the shortened version of the question. I'm aware of Gmail's limited CSS support, but I was reading "Guide to CSS support in email", which has a note for Gmail's support of .class
and #id
selectors:
(!)在某些情况下适用于在广告系列导入之前或期间内嵌CSS的情况。
(!) Works in some instances if CSS is inlined before or during campaign import
对于CSS支持,这是什么意思?对我来说,它似乎只是建议使用一个预处理器来采取任何样式声明,并将它们应用到匹配的元素。
What does this actually mean as far as CSS support is concerned? To me, it sounds like it's just suggesting to use a preprocessor to take any style declarations and apply them to the matched elements.
推荐答案
Gmail仅使用内联CSS。它不允许内部或外部样式表。或者说,我发现它的支持是不可靠的。使用此工具可将内部和外部样式转换为内联样式:
Gmail will only use CSS that is inline. It will not allow internal or external style sheets. Or rather I have found its support to be unreliable at best. Use this tool to do to convert internal and external style into inline for you:
http://inlinestyler.torchboxapps.com/styler/
它甚至会告诉您您的文档在不同的电子邮件客户端中的支持情况。这将允许你以更健全的方式发展,并且只在结束时转换它。
It even tells you how well your document is supported in different email clients. This will allow you to develop in a more sane fashion, and only convert it at the end.
这篇关于Gmail是否支持CSS类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!