Using custom fonts using CSS?

后端 未结 8 623
余生分开走
余生分开走 2020-11-22 09:01

I\'ve seen some new websites that are using custom fonts on their sites (other than the regular Arial, Tahoma, etc.).

And they support a nice amount of browsers.

8条回答
  •  情深已故
    2020-11-22 09:34

    To make sure that your font is cross-browser compatible, make sure that you use this syntax:

    @font-face {
        font-family: 'Comfortaa Regular';
        src: url('Comfortaa.eot');
        src: local('Comfortaa Regular'), 
             local('Comfortaa'), 
             url('Comfortaa.ttf') format('truetype'),
             url('Comfortaa.svg#font') format('svg'); 
    }
    

    Taken from here.

提交回复
热议问题