我们都知道在vue中可以定义多个<style>,一般为了防止全局污染,我们会使用<style scoped>代表这里面的css样式只在本页面生效。
这个当时测试是直接写,没有加层级,然后样式没生效,后面就直接删除,在私有的里面进行穿透修改了!如果要测试最好加本页面的大类,不然会污染全局!!!所以还是推荐私有穿透吧。
<style >
</style>
使用/deep/进行穿透,在mpvue中使用>>>穿透,编译会报错
.form-area {
width: 100%;
bottom: 1.88rem;
.form-wrap {
width: 340px;
position: relative;
left: 20px;
.form-item {
width: 100%;
height: 50px;
margin: 5px 0;
border-radius: 10px;
background-color: #fff;
/deep/.van-cell {
width: 240px !important;
position: none !important;
}
}
}
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有