Css uses @ font-face to change fonts locally. Why does it have no effect on domain names?

I would like to ask the great gods @ font-face to change the local font effectively. If you put it on the domain name, the font will not change

.

@ font-face {

font-family: "yt";
src: local("yt"),url(../font/iconfont/2.TTF) ;

}

Css
Aug.19,2021

the path of the font entered in the address bar: Domain name / font/iconfont/ simplified body 2.TTF
if you can't find it, configure the web server


  1. check whether the domain name server is configured with the MIME type corresponding to the font
  2. check whether a cross-domain header (Access-Control-Allow-Origin) has been added to the domain name server

refer to similar question: https://codeshelper.com/q/10.

Menu