当使用@font-faceCSS中使用自定义字体,我可以指定字体的相对路径.说我有以下结构:
WebContent
- css
|- style01.css
|- style02.css
|- ...
- fonts
|- font01.ttf
|- font01.ttf
|- ...
- images
|- ...
- js
|- ...
- index.html
- *.html
Run Code Online (Sandbox Code Playgroud)
我可以指定类似的东西:
@font-face {
font-family: 'font one';
src: url('../fonts/font01.ttf');
}
Run Code Online (Sandbox Code Playgroud)
因为上面似乎没有用.