简体   繁体   中英

Add new font with @font-face doesn't work

is there any error in the follow code ?

@font-face {
    font-family: 'raveFire';
    src: url('ravefire.eot');
    src: local('raveFire'), url('ravefire.ttf') format('truetype');
}

this code is into the file "style.css" and, the files ravefire.ttf and ravefire.eot are in the same folder than "style.css" ...

Ive tried use this new font-family in span, style, class, etc ... I also tried several browsers...

please, any help ?

I've been using font-face quite a bit recently and I've not seen the "local" reference, try it without, ie:

@font-face {
    font-family: 'raveFire';
    font-style: normal;
    font-weight: normal;
    src: url('ravefire.eot') format('eot'), url('ravefire.ttf') format('truetype');
}

Make sure your fonts are in the same folder as the page, or use absolute paths to them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM