Dynamically load google fonts after page has loaded

后端 未结 2 1823
一整个雨季
一整个雨季 2021-02-05 04:29

I would like to be able to have the user select which font they would like the page to be displayed in. Here is the way that Google recommends you do it using JavaScript.

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-05 04:51

    Check out the WebFont.load command in this github repo:

    https://github.com/typekit/webfontloader

    You can load whatever font you want dynamically:

      
      
    

提交回复
热议问题