当我指定sans-serif时,如何阻止Yahoo在HTML电子邮件中显示衬线字体? [英] How do I stop Yahoo displaying serif fonts in HTML emails when I've specified sans-serif?

查看:194
本文介绍了当我指定sans-serif时,如何阻止Yahoo在HTML电子邮件中显示衬线字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经汇集了一个HTML电子邮件。在一起,我们中的几个人知道如何做得很好(表格,内联样式等),它可以在多种浏览器和Outlook,Google和Hotmail中完美显示。



不过雅虎是另一回事。当我们指定sans-serif时,所有文本都以serif字体显示。以下是代码段,作为示例:

 < tr> 
< td colspan =2width =600pxstyle =padding:15px 0 15px 0; font-family:arial,sans-serif; font-size:40px; color:#0066cc;> ;
这里的一些文字
< / td>
< / tr>

我们尝试使用< p> 标签,而不是在其中设置样式,也尝试了< font face =arial,sans-serif> ,但这些都似乎不起作用。



有没有人有类似的经验和/或更重要的是,有没有任何HTML电子邮件大师知道如何解决这个问题?

解决方案

首先要看的是Yahoo给你的网页浏览器的HTML。如果他们实际上修改了HTML,你的答案。



否则,它可能是一个CSS规则,在自己的样式表中被定义为!important。如果是这种情况,那么 font-family:sans-serif!important 可以解决你的问题。


I've put together an HTML email. Together, a few of us here know how to do this pretty well (tables, inline styles, etc.) and it displays perfectly on multiple browsers and in Outlook, Google and Hotmail.

However, Yahoo is another matter. All of the text is displaying in a serif font when we have specified sans-serif. Here's a snippet of code as an example of how it's been done:

<tr>
  <td colspan="2" width="600px" style="padding: 15px 0 15px 0; font-family:arial,sans-serif; font-size:40px; color:#0066cc;">
    Some text in here
  </td>
</tr>

We've tried using <p> tags instead and styling inside that, also tried <font face="arial, sans-serif"> but neither of these seem to work.

Has anyone had a similar experience and/or, more importantly, are there any HTML email gurus out there who know how to resolve this issue?

解决方案

The first thing to look at is the HTML that Yahoo gives to your web browser. If they actually modified the HTML have your answer.

Otherwise, it could be a CSS rule which was defined as "!important" in their own stylesheet. If this is the case, then font-family:sans-serif !important could solve your issue.

这篇关于当我指定sans-serif时,如何阻止Yahoo在HTML电子邮件中显示衬线字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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