【问题标题】:How to exclude nod_module style css in Angular?如何在 Angular 中排除 node_modules 样式的 css?
【发布时间】:2020-01-24 00:10:39
【问题描述】:

如何排除以下 node_module Bootstrap 样式文件。

node_modules\bootstrap\scss\_reboot.scss

由于这个文件,我的自定义样式被覆盖。

我尝试删除 angular.json 文件中的以下属性,但仍应用引导样式。

"@ng-bootstrap/ng-bootstrap": "^4.0.1",
"bootstrap": "^4.2.1", 

【问题讨论】:

    标签: html css angular bootstrap-4


    【解决方案1】:

    我已经通过更新 /src/styles/_base.scss

    中的 font-family 值解决了

    身体{ 字体家族:$primary-font; }

    body {
      font-family: $font-family-base;
    }
    

    【讨论】:

      猜你喜欢
      • 2018-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-23
      • 1970-01-01
      • 1970-01-01
      • 2020-10-10
      相关资源
      最近更新 更多