mal*_*awi 4 css angular angular5
我正在从其样式文件中对角度组件进行样式设置,发现必须使用:host,:host()或:host-context选择器,它们之间有什么区别?
是样式主机组件的语法。
是一个实验性的CSS伪类函数,用于选择the shadow host of the shadow DOM containing the CSS it is used inside(参考)
是用于在当前元素之外的任何地方设置特定类样式的语法。该类必须已经应用于当前元素范围之外的元素。
可以在此博客文章中找到有关Angular应用程序上下文的更多深入信息。