相关疑难解决方法(0)

使用Google Webfonts时,Outlook中的CSS字体堆栈替换问题

在HTML电子邮件中使用Google Webfonts我在Outlook(2007,2010等)中遇到了在合并webfonts之前没有出现的字体替换问题.它忽略了字体堆栈并直接进入Times.

尽管使用内联回退字体堆栈,但仍会发生这种情况.

我已经注意到之前发布的类似问题,但仅作为一般性问题,与webfonts的使用无关.以前所有的字体回退都可以正常工作.我正在使用Litmus进行电子邮件测试.

有谁知道为什么会发生这种情况?

链接到Litmus:https://litmus.com/pub/53a33c7/screenshots

最初在CSS中链接的字体如下:

<link href='http://fonts.googleapis.com/css?family=Arvo|Droid+Serif:400,700,400italic,700italic|Roboto:300' rel='stylesheet' type='text/css'>
Run Code Online (Sandbox Code Playgroud)

在另一个答案中看到可能的解决方案后,我也尝试使用@ font-face和自托管文件,但它不起作用(我也更新了类名):

除了font-face尝试的解决方法:

<!--[if !mso]><!--> 

@font-face {
    font-family: 'droid_serif';
    src: url('http://www.suissamesser.com/emails/rsdsa/DroidSerif-webfont.eot');
    src: url('http://www.suissamesser.com/emails/rsdsa/DroidSerif-webfont.eot?#iefix') format('embedded-opentype'),
         url('http://www.suissamesser.com/emails/rsdsa/DroidSerif-webfont.svg#droid_serif') format('svg'),  
         url('http://www.suissamesser.com/emails/rsdsa/DroidSerif-webfont.woff') format('woff'),
         url('http://www.suissamesser.com/emails/rsdsa/DroidSerif-webfont.ttf') format('truetype');

    font-weight: normal;
    font-style: normal;

}
<!--<![endif]-->
Run Code Online (Sandbox Code Playgroud)

Outlook特定的覆盖CSS似乎有效,但存在优先级问题.我不相信Outlook认可!重要声明所以我一直在努力寻找更具体的选择.但是,我仍然不明白为什么会发生这种情况,如果有更简单的解决办法.

Outlook字体覆盖摘录:

    <!--[if gte mso 9]>
    <style>
        /* Target Outlook 2007 and 2010 */

            h1 { font-family: 'Georgia',serif !important; font-weight:normal; }
            h1 a { font-family: 'Georgia',serif !important; font-weight:normal; }
            h2 { font-family: 'Trebuchet MS',arial, helvetica, sans-serif; font-weight:normal; …
Run Code Online (Sandbox Code Playgroud)

html css outlook html-email

10
推荐指数
1
解决办法
1万
查看次数

标签 统计

css ×1

html ×1

html-email ×1

outlook ×1