Vue项目中使用iview input标签去掉边框的方法!!!!!!!!!!!!!!!!!!!!
1.错误写法html中 :<Input class="jm-input" size="large" v-model="jmName" placeholder="请输入你的大名" />css中 :.ivu-input{border: none!important;}嘿嘿,不生效。。。。。。。2.正确写法写法1:深度监听样式--------推荐...
·
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>
更多推荐
已为社区贡献2条内容
所有评论(0)