覆盖胸甲层的Gmail字体
我想使用Thymeleaf和我的自定义字体(Google字体)覆盖Gmail默认字体,但我尝试了这些,但没有可行的方法:
1,使用内部CSS
<style>
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,700;1,900&display=swap');
p,pre {
font-family: 'Nunito', sans-serif;
}
</style>
2,使用Inline CSS使用Inline CSS,
<style>
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,700;1,900&display=swap');
</style>
<p class="mail-body-greeting" th:text="#{email.activation.greeting(${user.firstName})}" style="font-family: 'Nunito', sans-serif;">Dear John</p>
我是否缺少某些内容?
I want to override Gmail default font using Thymeleaf with my custom font (a google font) and I tried these but none works:
1, using internal CSS
<style>
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,700;1,900&display=swap');
p,pre {
font-family: 'Nunito', sans-serif;
}
</style>
2, using inline CSS
<style>
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,300;0,700;1,900&display=swap');
</style>
<p class="mail-body-greeting" th:text="#{email.activation.greeting(${user.firstName})}" style="font-family: 'Nunito', sans-serif;">Dear John</p>
Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论