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