How can I use Google's Roboto font on a website?

前端 未结 13 896
旧巷少年郎
旧巷少年郎 2020-12-12 10:23

I want to use Google\'s Roboto font on my website and I am following this tutorial:

http://www.maketecheasier.com/use-google-roboto-font-everywhere/2012/03/15

<
13条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 10:57

    For Website you can use 'Roboto' font as below:

    If you have created separate css file then put below line at the top of css file as:

    @import url('https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,500,500i,700,700i,900,900i');
    

    Or if you don't want to create separate file then add above line in between :

    
    

    then:

    html, body {
        font-family: 'Roboto', sans-serif;
    }
    

提交回复
热议问题