angular - CSS在浏览器背面扭曲
问题描述
我有一个使用带有多个组件的 TS 的角度应用程序。每个组件都有自己的 CSS,没有封装。
@Component({
selector: 'app-comp1',
templateUrl: './component1.html',
styleUrls: ['./component1.css'],
encapsulation: ViewEncapsulation.None
})
这里的问题是,如果用户将浏览器从组件 2 击回组件 1,则生成的 html 包含两个组件的 css,从而扭曲了组件 1。
我如何保持浏览器上的 css 干净。
解决方案
推荐阅读
- open-source - 我在哪里可以找到维基百科/维基词典模板的源代码?
- database - 从 vimeo 存储时间戳
- c# - 如何创建一个保持可点击的不可见复选框?
- vba - 是否可以通过单击表单中的按钮来删除子表单中的所有行?
- javascript - 用于检查属性的循环不是未定义的吗?
- python - Django:Admin List_display 不适用于一种特定模型
- ios - 来自 Firebase 的数据未显示在 UITableView 中
- node.js - 有没有办法创建一个可用于多个文件的变量(Node.JS)
- c# - 如何为 .NET Core 3.0 Worker 服务设置事件日志
- excel - 如何在excel vba中选择特定范围?