gpt4 book ai didi

node.js - 在 Jade 中,无法使样式@font-face工作

转载 作者:太空宇宙 更新时间:2023-11-03 23:44:41 25 4
gpt4 key购买 nike

来自工作的 css 文件(由 font-squirrel 生成):

@font-face {  font-family: 'SnowTopCaps';   src: url('/fonts/snowtopcaps-webfont.eot');   src: url('/fonts/snowtopcaps-webfont.eot?#iefix') format('embedded-opentype'),    url('/fonts/snowtopcaps-webfont.woff') format('woff'),    url('/fonts/snowtopcaps-webfont.ttf') format('truetype'),    url('/fonts/snowtopcaps-webfont.svg#snowtopcaps') format('svg');  font-weight: normal;  font-style: normal;}     

尝试在jade文档中的style部分声明:

...style  @font-face    font-family      | SnowTopCaps    src      | url('/fonts/snowtopcaps-webfont.woff') format('woff')    font-weight      | normal    font-style      | normal    ...

但没有将 style 声明写入生成的 html 中?

有人看到这里缺少什么吗?

最佳答案

此语法适用于 HTML,不适用于 css。使用

style.
@font-face {
font-family: 'SnowTopCaps';
src: url('/fonts/snowtopcaps-webfont.eot');
src: url('/fonts/snowtopcaps-webfont.eot?#iefix') format('embedded-opentype'),
url('/fonts/snowtopcaps-webfont.woff') format('woff'),
url('/fonts/snowtopcaps-webfont.ttf') format('truetype'),
url('/fonts/snowtopcaps-webfont.svg#snowtopcaps') format('svg');
font-weight: normal;
font-style: normal;
}

或者使用 :stylus 过滤器

关于node.js - 在 Jade 中,无法使样式@font-face工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15569447/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com