html - 如何在 component.html 中删除 Boostrap 默认正文样式
问题描述
我有一个带有我自己的 css 的角度小部件指令。当我在另一个应用程序组件中添加我的小部件时,它会被 Bootstrap 默认 css/styles 覆盖。
我的问题是如何在我试图覆盖的组件 .css 中删除字体系列,但它不起作用?
body {
line-height: 1.15;
}
我也尝试了 !important 如下,但仍然应用引导样式
body {
font-family: "Open Sans", sans-serif !important;
}
解决方案
在引导 CSS 之后插入您的 CSS。如果这不起作用用户 !important 覆盖您想要的样式。
例子:
body {
font-family:none!important;
line-height: 1.15!important;
}
推荐阅读
- laravel - Laravel 唯一请求更新
- android - 根据条件隐藏 Listview 行中的 textview
- python - Python Pandas 查找数据框中存在的多个列标题
- linux - makefile:在每个接收者中重新分配变量以存储步骤名称
- android - 如何在 Android Oreo + 中以编程方式获取 WiFi 热点状态
- c++ - QtCreator 调试器:进入 std::function
- sql - 更大的主表甚至更大的权限表的有效连接技术
- ios - 如何在堆栈中将超过 1 个视图控制器委托给视图控制器?
- ios - Apple Pay In App Provisioning:LinkAndProvisionResponse API
- ms-access - 如何从多行中查找帖子的分手日期