【发布时间】:2014-07-08 15:44:53
【问题描述】:
我需要你的帮助,我正在尝试在 PHPMAILER 中更改电子邮件的字体,并且只识别内联 css,头部中的样式标签不起作用(我不知道为什么)。
你知道如何将@font-face 插入到 tbody 中吗?
$contenido = '<!doctype html>
<html>
<head>
<style>
@font-face {
font-family: dinot-regularregular;
src: url(xxxxxxxxxxxx/css/Font/dinot-regular-webfont.woff);
}
body {
font-family: dinot-regularregular;
}
</style>
</head>
<body>';
$contenido .= '
<table>
<tbody style="font-family:dinot-regularregular; font-size:16px; color:#666666;">
// Content
</tbody>
</table>';
感谢您的帮助。
【问题讨论】:
-
不要认为这行得通。或者您可以尝试在电子邮件本身中包含字体文件。
-
确保您的浏览器/电子邮件客户端支持嵌入字体 woff 格式...
-
@putvande 我已经尝试过了,不行。
-
@shennan 是的,可以使用普通字体,而不是像这样自定义。