在玉石中,无法得到@font风格
从工作的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;
}
或者使用:stylis过滤器
链接地址: http://www.djcxy.com/p/60797.html