How to install a Font in server

前端 未结 6 1468
清歌不尽
清歌不尽 2021-01-04 06:42

I have downloaded and installed a font in my system, then i used this font in my project, its worked fine in local system, but when i upload this page to server its not work

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-04 07:25

    You can use / for getting relative paths.

    @font-face {
        font-family: Font-Name;
        src: url(/content/font/Font-Name.ttf ); /* IE */
        src: local("B Yekan"), url(/Content/fonts/Font-Name.ttf format("truetype"); /* non-IE */
        font-style: normal;
        font-weight: 100;
    }
    

提交回复
热议问题