Arn*_*old 7 php email fonts html-email sendgrid
是否可以在sendgrid中导入字体?我一直在尝试使用@ font-face,但似乎没有用,但也许我做错了.
我使用的代码示例:
@font-face {
font-family: Avenir;
src: url('http://cdn.linktofont.com/font.ttf');
}
Run Code Online (Sandbox Code Playgroud)
Ted*_*oas 10
我们使用SendGrid在StackOverflow上发送我们的一些电子邮件,如果它们被正确嵌入,我可以保证网络字体可以正常工作.我用这个代码:
<!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->
<!--[if mso]>
<style>
* {
font-family: sans-serif !important;
}
</style>
<![endif]-->
<!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. More on that here: http://stylecampaign.com/blog/2015/02/webfont-support-in-email/ -->
<!--[if !mso]><!-->
<link href='https://fonts.googleapis.com/css?family=Roboto:400,700' rel='stylesheet' type='text/css'>
<!--<![endif]-->
<style>
* {font-family: Roboto, sans-serif;}
</style>
Run Code Online (Sandbox Code Playgroud)
我不确定如何最好地嵌入像Avenir这样的高级字体,并且不知道.ttf
电子邮件客户端支持的格式有多好.但是,以这种方式引用Google字体,自定义Web字体将在使用SendGrid支持它们的邮件客户端中工作.
归档时间: |
|
查看次数: |
5102 次 |
最近记录: |