Cross browser @font-face use

前端 未结 1 1206
长情又很酷
长情又很酷 2021-01-21 06:16

I\'ve been having a lot of difficulties with using custom fonts and @font-face. I\'m trying to get a font consistent across the latest versions of Chrome, Safari &a

1条回答
  •  囚心锁ツ
    2021-01-21 07:15

    Try it like this:

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

    Otherwise, open the .TTF file on your computer. If it already appears bold, the font WILL NOT be able to be decreased in size because that's the normal look for the font.

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