[css] 樣式穿透 >>> /deep/ ::v-deep


有些樣式無法修改,需要借助於深層樣式

>>>    別名  /deep/   ::v-deep

給父元素添加類名借助於深層樣式

 

>>>只可使用於css

<style> .box >>> .el-input__inner{ padding:0 } </style>

如果有scoped不使用第三方css擴展語言,可以使用/deep/

<style scoped >
.box /deep/ .el-input__inner{ padding:0 }
</style>

使用scss或者其他第三方css擴展語言和scoped ,修改element ui樣式需要使用 ::v-deep

<style scoped lang='scss'>
.box ::v-deep .el-input__inner{ padding:0 } </style>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM