【问题标题】:How to use font-face in sending email如何在发送电子邮件时使用字体
【发布时间】:2018-02-17 11:16:38
【问题描述】:

我正在尝试使用我自己的字体在我的网站中发送电子邮件,并且我已将我的字体上传到我的网站,并且我在邮件中使用了 font-face 来使用它。 但它不起作用,并且在发送邮件中没有字体。 这是我的邮件:

<style>

    @font-face {
        font-family: 'bmitra';
        src: url(http://roozbehi.ir/Fonts/BMitra.eot?#iefix) format("embedded-opentype"), url(http://roozbehi.ir/Fonts/BMitra.woff) format("woff"), url(http://roozbehi.ir/Fonts/BMitra.ttf) format("truetype");
        font-weight: normal;
        font-style: normal
    }
    #MailContainer {
        width: 87%;
        height: auto;
        margin: 0 auto;
        border: 1px solid rgb(204, 214, 220);
        border-top: 5px solid rgb(46, 123, 175);
        padding: 4% 6%;
        color: #666;
        font-family: bmitra;
        letter-spacing: 0.5px;
        font-size: 13.8px;
        line-height: 16px;
        background-color: rgb(249, 251, 251);
        direction: rtl;
        font-weight: 300;
    }
</style>
<div id="MailContainer">

</div>

我该怎么办?

【问题讨论】:

标签: c# asp.net fonts


【解决方案1】:

您不能在电子邮件中使用字体标签。

你必须使用图像或文字来实现。

根据 Campaign Monitor 的一些研究,@font-face 仅适用于 Apple 的 Mail.app 和 iOS 上的 Mail 应用。

参考:https://css-tricks.com/custom-fonts-in-emails/

【讨论】:

    猜你喜欢
    • 2012-05-17
    • 2022-01-01
    • 1970-01-01
    • 2013-10-23
    • 1970-01-01
    • 1970-01-01
    • 2011-11-13
    • 2020-10-15
    • 2023-03-18
    相关资源
    最近更新 更多