在CSS中使用@font-face
使用自定义字体时,是否可以指定字体的相对路径。说我有以下结构:
WebContent
- css
|- style01.css
|- style02.css
|- ...
- fonts
|- font01.ttf
|- font01.ttf
|- ...
- images
|- ...
- js
|- ...
- index.html
- *.html
我可以指定类似的内容:
@font-face {
font-family: 'font one';
src: url('../fonts/font01.ttf');
}
因为上述似乎不起作用。
答案 0 :(得分:5)
似乎问题在于它不喜欢名称周围的单引号'
。