4
在CSS中使用@font-face
來使用自定義字體時,我可以指定字體的相對路徑。說我有以下結構:相對路徑可以用於@ font-face src嗎?
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');
}
,因爲上述似乎不工作。