scoped導致樣式修改失敗

爲了避免全局污染,當前頁面樣式一般都回會加上scoped屬性,但有時候重寫組件樣式會不生效,此時再需要修改的代碼前面加上/deep/即可(切記後面不要有空格,緊跟選擇器),具體入下面代碼所示

<style lang="scss" scoped>
    .report-index-box{

		/deep/.selectName {
			padding: 0 1vw;
			font-size: 1vw;
			color: #606266;
		}
		/deep/.selectMain {
			padding:24px 0;
		}
		/deep/.el-table th.is-leaf {
			height: 50px!important;
			background: #F8F8F9!important;
		}
		/deep/.el-table__fixed {
			height:auto!important;
			bottom: 17px!important;
		}
		/deep/.el-table__fixed-body-wrapper{
			height:auto!important;
			bottom: 0px!important;
		}
	}
</style>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章