Outlook 2013忽略字体系列 [英] Outlook 2013 Ignores font-family
问题描述
为Outlook 2013编写电子邮件时指定字体系列的最佳方式是什么?我发现font-family被添加到内联中时会被忽略: :Helvetica,Arial,sans-serif;>文字< / span>
我发现这样做:
< span>< font face =Helvetica,Arial,sans-serif>文字< / font>< / span>
然而,这是一种痛苦,因为我不得不在添加文本的地方添加标签。将标签包裹在几个元素周围会被忽略。有没有一种方法可以设置字体一次而忘掉它?解析方案
强制Outlook 2013使用的有效方法指定字体堆栈将在< span>
中包装相关文本,并在定义时使用!important
字体家庭
。 Outlook仍然会删除头部定义的任何Google字体,但其他电子邮件客户端将使用它们。这里是一个例子:
< head>
< link href ='http://fonts.googleapis.com/css?family = Indie + Flower'rel ='stylesheet'type ='text / css'>
< / head>
< body>
< table>
< tr>
< td style =font-family:Helvetica,Arial,sans-serif; font-size:12px;>
这将始终是Helvetica。
< / td>
< / tr>
< / table>
< table>
< tr>
< td style =font-family:'Indie Flower',Helvetica,Arial,sans-serif; font-size:12px;>
Outlook将显示Times New Roman。其他人将展示Helvetica或Indie Flower。
< / td>
< / tr>
< / table>
< table>
< tr>
< td style =font-family:Helvetica,Arial,sans-serif; font-size:12px;>
Outlook将显示Helvetica,其他人将显示Indie Flower。
< / span>
< / td>
< / tr>
< / table>
< / body>
这篇文章来自这篇精彩的文章: https://www.emailonacid.com/blog/article/email-development/custom-font-stacks-in -outlook
What is the best way to specify the font-family when coding emails for Outlook 2013? I have found that font-family is ignored when it is added inline like this:
<span style="font-family: Helvetica, Arial, sans-serif;">Text</span>
I have found that this works:
<span><font face="Helvetica, Arial, sans-serif">Text</font></span>
However, this is a pain as I have to add the tag everywhere that text is added. Wrapping a tag around several elements is ignored. Is there a way that I can set the font once and forget about it?
An effective way to force Outlook 2013 to use specified font stack is to wrap the text in question in a <span>
and to use !important
when defining the font-family
. Outlook will still remove any Google fonts that are defined in the head, but other email clients will use them. Here is an example:
<head>
<link href='http://fonts.googleapis.com/css?family=Indie+Flower' rel='stylesheet' type='text/css'>
</head>
<body>
<table>
<tr>
<td style="font-family: Helvetica, Arial, sans-serif; font-size: 12px;">
This will always be Helvetica.
</td>
</tr>
</table>
<table>
<tr>
<td style="font-family: 'Indie Flower', Helvetica, Arial, sans-serif; font-size: 12px;">
Outlook will display Times New Roman. Others will display Helvetica or Indie Flower.
</td>
</tr>
</table>
<table>
<tr>
<td style="font-family: Helvetica, Arial, sans-serif; font-size: 12px;">
<span style="font-family: 'Indie Flower', Helvetica, Arial, sans-serif !important;">
Outlook will display Helvetica, others will display Indie Flower.
</span>
</td>
</tr>
</table>
</body>
This came from this awesome article: https://www.emailonacid.com/blog/article/email-development/custom-font-stacks-in-outlook
这篇关于Outlook 2013忽略字体系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!