ionic change default font

后端 未结 6 1072
-上瘾入骨i
-上瘾入骨i 2021-02-12 11:52

I know this question is asked and answered before in the links below. I want to change the default font without having to add to every css.

Things I have tried:

6条回答
  •  一向
    一向 (楼主)
    2021-02-12 12:46

    Import all the font files in to your app.

    Example:

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

    If you want this font in entire app ,Just give like this

    * {
        font-family: 'Lato-Light' !important;
    }
    

    If you have any doubt.Please let me know.Thanks

提交回复
热议问题