vue之scoped穿透
問題:在頁面中,需要了第三方插件的樣式,又不想取消scoped,防止造成樣式污染
方法:>>>
代碼:
#tab >>> .ivu-table-stripe-odd td{ background-color: #ecf3fd!important; border-bottom: 0; }
tab 為需要穿透的組件id
注意:
在sass等解析器中>>>可能不會被識別,需要使用/deep/代替(/deep/ 為 >>> 的別名)
代碼:
#tab /deep/ .ivu-table-stripe-odd td{ background-color: #ecf3fd!important; border-bottom: 0; }
鑽研不易,轉載請注明出處~~~~~~