dongyan9950 2017-07-21 10:45
浏览 354
已采纳

fonts.googleapis.com想要在本地

I am using adminlte theme for xyz project i want all css on local


fonts.googleapis.com and fonts.gstatic.com goes on server i wants on local thats why i am commenting that line in \css\AdminLTE.css see in below code but after that goes in server.

/*@import url(https://fonts.googleapis.com/css?
family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);
!
*   AdminLTE v2.3.8
*   Author: Almsaeed Studio
*    Website: Almsaeed Studio <http://almsaeedstudio.com>
*   License: Open source - MIT
*           Please visit http://opensource.org/licenses/MIT for more 
information
!*/
/*
* Core: General Layout Style
* -------------------------
*/
  • 写回答

1条回答 默认 最新

  • drbvm26000 2017-07-21 11:03
    关注

    its simple but you'll have to download fonts

    go to this css file https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic

    download all fonts which are used in this css file, for example in fonts/ folder..

    then instead of using

        import url(https://fonts.googleapis.com/css?
    family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic);
    

    save the css file as "fonts.css" and include it in your website after replacing all font urls to target your local font directory..

    one example

    @font-face {
      font-family: 'Source Sans Pro';
      font-style: normal;
      font-weight: 300;
      src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(fonts/toadOcfmlt9b38dHJxOBGOpKQFvsMoBH--zPuE-O8ur3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
      unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?