B
B
BonBon Slick2016-07-03 12:46:48
css
BonBon Slick, 2016-07-03 12:46:48

Error in the net::ERR_FILE_NOT_FOUND console, but it is found and it works as it should, how is it?

Added my font:

@font-face {
    font-family: Situs;
    src: url(fonts/situs.ttf);
}
* {
    font-family: Situs;
    font-style: italic;
}

It works as it should, but in the console it writes an error that the font was not found, how is it?
Failed to load resource: net::ERR_FILE_NOT_FOUND

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2016-07-03
@BonBonSlick

You need to specify the correct absolute path from the site root to the font. Now you have a relative path and the font is searched in the current directory.
And it is displayed normally, most likely because you have it installed locally.

K
kfyuecn, 2017-06-13
@kfyuecn

put in apostrophes
@font-face {
font-family: 'Situs';
src: url('fonts/sites.ttf');
}
* {
font-family: 'Situs';
font-style: italic;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question