【发布时间】:2023-03-30 18:59:01
【问题描述】:
我正在创建一个 HTML 时事通讯。我正在使用嵌套数组。我有两个问题:如何导入字体?因为 @import 和 @font-face 不适用于我的时事通讯(但适用于简单的 html)
第二个是这样的:
我怎样才能“vertical align middle”2 跨度不同的字体大小?它适用于简单的 html,但不适用于时事通讯......
<table width="100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:10px;">
<div>
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://" style="height:60px;v-text-anchor:middle;width:180px;" arcsize="17%" stroke="f" fillcolor="#00436f">
<w:anchorlock/>
<center>
<![endif]-->
<a href="#"
style="background-color:#00436f;font-weight:bold;border-radius:10px;color:#ffffff;display:inline-block;font-family:sans-serif;font-size:13px;text-align:center;text-decoration:none;width:180px;-webkit-text-size-adjust:none;padding-top: 25px; padding-bottom: 25px;"> <span style="font-size:2em;font-weight:bold;vertical-align:middle">15</span>
<span style="font-size:1.2em;font-weight:bold;text-transform:uppercase;vertical-align:middle">Février</span>
</a>
<!--[if mso]>
</center>
</v:roundrect>
<![endif]-->
</div>
<!--<p style="Margin: 0;font-size: 14px;line-height: 17px;width: 100%;padding: 25px 0;text-align: center;border-radius: 10px;background: #00436f;-->
<!-- color: white;">-->
<!--</p>-->
<p style="padding-top:10px;Margin: 0;line-height:1;font-size: 1em;font-weight:bold;color:#797979">Réunion d'information Loiret Numérique</p>
<p style="Margin: 0;font-size: 12px;line-height: 14px">
Mairie de Montargis - Salle Montdignan
</p>
</td>
</tr>
</tbody>
</table>
我得到了什么:
我需要什么:
我的字体:
@media screen{
@import url("https://use.typekit.net/jqe0zpu.css");
@import url("https://www.site.fr/.../GT-Walsheim-Regular.ttf");
@font-face {
font-family: 'Walsheim';
font-weight: normal;
font-style: normal;
src: local("Walsheim"),url('https://www.site.fr/.../GT-Walsheim-Regular.eot');
}
@font-face {
font-family: 'Walsheim';
src: local("Walsheim"),url('https://www.site.fr/.../GT-Walsheim-Bold.eot');
src: url('https://www.site.fr/.../GT-Walsheim-Bold.ttf') format('truetype'),
url('https://www.site.fr/.../GT-Walsheim-Bold.woff') format('woff'),
url('https://www.site.fr/.../GT-Walsheim-Bold.woff2') format('woff2'),
url('https://www.site.fr/.../GT-Walsheim-Bold.eot?#iefix') format('embedded-opentype');
font-weight: 800;
font-style: normal;
}
}
【问题讨论】:
-
@font-face不起作用是什么意思?据我所知,时事通讯的设计与“普通”页面的设计相同 -
这是一个很好的指南,可以帮助您了解在电子邮件中可以使用和不能使用哪些 CSS - campaignmonitor.com/css,这显示了字体支持 campaignmonitor.com/css/text-fonts/font-face
-
许多邮件客户端对 html/css 的功能非常有限。您希望支持哪些版本的 Outlook,是否也希望支持其他邮件客户端?如果有,有哪些?
-
客户端忽略了我的字体(我的主要客户端是 Outlook 2010)。 @Pete 我已经看到了这个,我根据这个更改了我的一些代码。但我的问题仍然在这里
-
发布有关样式表以及如何导入字体的代码。请记住,Outlook 和 Gmail 不适用于 Google 字体等基于网络的字体。 Outlook 将默认为
Times New Roman由于您将衬线字体显示为输出,我认为这是问题所在。
标签: css html-table outlook html-email newsletter