zoukankan      html  css  js  c++  java
  • laravel如何去掉google相关的css(因为速度慢)

    laravel如何去掉google相关的css(因为速度慢)

    一、总结

    一句话总结:

    去掉文中两处加载的Raleway 字体,因为国内访问google很慢

    二、去掉 Laravel 项目中引入的 Raleway 字体

    博客对应课程的视频位置:2、laravel如何去掉google相关的css
    https://www.fanrenyi.com/video/9/42

    转自或参考:去掉 Laravel 项目中引入的 Raleway 字体 | Laravel China 社区
    https://learnku.com/articles/5255/remove-the-raleway-font-introduced-in-the-laravel-project

    Laravel 项目中引入 Raleway 字体的地方有两处:

    1. public/css/app.css
    @import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);@charset "UTF-8"; ...
    1. resources/assets/sass/app.scss
    // Fonts
    @import url("https://fonts.googleapis.com/css?family=Raleway:300,400,600");
    
    // Variables
    @import "variables";
    
    // Bootstrap
    @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";

    把这两处中引入 Raleway 的地方删掉即可。

    你可能要问,为什么要删?

    答案是因为一个众所周知的原因,google 字体的加载可能非常缓慢,导致页面长时间处于空白、无响应状态。

    另外可以在webstorm中 ctrl+shift+r 来全家搜索

    googleapis

     
  • 相关阅读:
    codeforces 733D
    HDU2647
    匈牙利算法 DFS模板(了解度+1)
    HDU1532 网络流:最大流之福德福克森算法
    mysql5 解压版 安装 建用户授权采坑
    Spring Boot 相关随笔
    Spring Boot 项目jar包 构建运行
    随笔小结
    war包 jar包理解(记录)
    vue axios异步请求及回调函数(前台)
  • 原文地址:https://www.cnblogs.com/Renyi-Fan/p/12117834.html
Copyright © 2011-2022 走看看