Add a font to a website

后端 未结 2 1026
星月不相逢
星月不相逢 2021-01-07 15:47

I am trying to add this font : http://www.fonts2u.com/vps-dong-da-hoa.font

to my website. Here is my CSS :

@font-face {
font-family: \"VPSDODAH\";
sr         


        
相关标签:
2条回答
  • 2021-01-07 16:08

    Not all browser support .ttf. Use a font generator to get all the font types ( I use font2web ) and then just add the fonts via @font-face:

    @font-face {
        font-family: 'fontName';
        src: url('../fonts/fontName.eot');
        src: url('../fonts/fontName.eot?iefix') format('eot'),
             url('../fonts/fontName.woff') format('woff'),
             url('../fonts/fontName.ttf') format('truetype'),
             url('../fonts/fontName.svg#fontName') format('svg');
        font-weight: normal;
        font-style: normal;
     }
    

    Read here about browser font support.

    0 讨论(0)
  • 2021-01-07 16:08

    You can try this website for your web font generation. If your font exists, you can convert it and get all the @font-face parameters to apply it for your website.

    0 讨论(0)
提交回复
热议问题