在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