。。。必須要吐槽下了,太坑啊,直接權重重置樣式不生效。。。
1.錯誤寫法
html中 :
<Input class="jm-input" size="large" v-model="jmName" placeholder="請輸入你的大名" />
css中 :
.ivu-input{
border: none!important;
}
嘿嘿,不生效。。。。。。。
2.正確寫法
寫法1:深度監聽樣式--------推薦
css中 :
使用/deep/深度監聽樣式
<style lang="less" scoped>
/deep/.ivu-input{
border: none!important;
}
</style>
寫法2:新建樣式標籤,重置樣式
css中 :
要重新建個標籤,同時裏面不能寫scoped的。
<style>
.ivu-input{
border: none!important;
}
</style>
<style lang="less" scoped>
// .ivu-input{
// border: none!important;
// }
</style>