HTML电子邮件中的字体颜色 - Gmail [英] Font Color in HTML Email - Gmail

查看:403
本文介绍了HTML电子邮件中的字体颜色 - Gmail的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我必须使用内联CSS来对HTML电子邮件中的任何内容进行样式化,但是我注意到在Gmail中发生的奇怪覆盖。我试图更改表格行中文本的颜色:

I know that I have to use inline CSS to style anything in an HTML email, but I am noticing an odd override that is occuring in gmail. I am trying to change the color of the text in a table row:

<tr style='color: #000; font-size: 14px; font-family: Verdana, serif;'>

但是当我在gmail中打开这封电子邮件时,字体族和黑色被gmail覆盖风格。我通过Firebug看到这个:

but when I open this email in gmail, the font-family and black color is being overwrote by gmail stylings. I'm seeing this via Firebug:

正在使用紫色,而不是我想要的黑色,字体系列默认为arial,sans-serif。有没有人知道如何安全地覆盖gmail强迫我的样式?

That purple color is being used instead of the black I want, and the font family is defaulting to arial,sans-serif. Does anyone know of a way to safely override the styling that gmail is forcing on me?

UPDATE

我将颜色更改为非黑色,即#212a2c,颜色更改正确,但是font-family仍然停留在arial上。

I changed the color to a non-black color, i.e. #212a2c and the color changed correctly, but the font-family is still stuck on arial.

推荐答案

看起来你是TR的样式,但是Gmail已经超越了TD的风格。当TD和TR冲突时,TD将获胜,因为它是最直接的容器...根据css3规则的最接近的匹配。我想如果你在你的TD上使用内联样式,你将能够胜过它。

It looks like you are styling the TR but gmail is over riding it with a style to the TD. When a TD and a TR conflict, the TD will win because it is the most immediate container...the closest match as per css3 rules. I think if you use inline style on your TD you will be able to over ride it.

这篇关于HTML电子邮件中的字体颜色 - Gmail的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆