Using custom fonts using CSS?

后端 未结 8 624
余生分开走
余生分开走 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:56

    You have to download the font file and load it in your CSS.

    F.e. I'm using the Yanone Kaffeesatz font in my Web Application.

    I load and use it via

    @font-face {
        font-family: "Yanone Kaffeesatz";
        src: url("../fonts/YanoneKaffeesatz-Regular.ttf");
    }
    

    in my stylesheet.

提交回复
热议问题