字体在电子邮件中无法正常显示

时间:2017-02-21 09:31:24

标签: php html css

我在php电子邮件中使用'Raleway'字体作为电子邮件正文的字体,但文本未显示在电子邮件客户端的“Raleway”中。文本的样式是内联的。

<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css" />


<div style="font-family: Raleway, sans-serif">
//Content
</div>

2 个答案:

答案 0 :(得分:1)

试试这段代码,

$("#suggest").autocomplete({
        delay: 100,
        minLength:2,
        **source: function (request, response) {
            var temp = [];
                   usersList.filter(buildResponse);

                   function buildResponse(p){
                      for (var key in p) {
                      if (p.hasOwnProperty(key)) {
                       if(p[key].indexOf(request.term) > -1){
                        temp.push({
                        "label" : p[key],
                        "value" : p                     
                        });                      
                       }
                        }
                      }
                   }
                   console.log(temp);
                  response(temp); 
            }**,
        select: function (event, ui) {
        // Prevent value from being put in the input:
        this.value = ui.item.label;
        // Set the next input's value to the "value" of the item.
        console.log(ui.item);
        event.preventDefault();
        }
      });

答案 1 :(得分:1)

External fonts/links are best avoided in email. You can set the font inline in the chance that they have that font installed already with a backup font chosen like this:

   <td style="font-family: 'Raleway', Arial, sans-serif;></td>

However it should be noted that the bulk would display the backup font. but this just shows it as a first option in case.