在Angular 4中理解:: ng-deep的功率
语法和usage 概述{ :: ng-deep { p { &:Last-Child { 边缘底:0; } } } }
In this example, the style specified within ::ng-deep will be applied to all matching elements in all child components within the parent component, including deeply nested ones.Compatibility with IE11
It's worth noting that ::ng-deep is not officially supported in Internet Explorer 11 (IE11)。虽然某些IE11版本可能会部分支持它,但建议在定位IE11浏览器时使用替代方法。[&& &&&&&&&&&&&&&&&&&&考虑[&&&&&&&&&&&&&&&&&&&&&:: ng-deep可以通过允许访问深层嵌套嵌套嵌套的元素来简化样式的复杂组件结构。但是,当它绕过封装时,明智地使用它很重要,这可能导致风格冲突或意外行为。在必要时使用:: ng-deep,但请考虑尽可能探索更安全的替代方案。
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3