vue scoped 解決樣式不生效問題


對於添加樣式不能影響子組件樣式的情況使用:>>>

<style scoped> .sti-inline{ display: inline;
    } .sti-searchform form .sti-reset-margin{ margin-bottom:0px;
    } .sti-searchform{ line-height: 1;
    } .sti-searchform.searchform{ margin-bottom: 10px;
    } .phone >>> .el-form-item__label, label{ padding-left: 0 !important; padding-right: 0 !important; width: 115px !important;
    } .phone >>> .el-form-item__content{ margin-left: 115px !important;
    } </style>

說明參考:

https://vue-loader.vuejs.org/zh/guide/scoped-css.html#子組件的根元素

 


免責聲明!

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



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