微信小程序手机预览子组件不显示背景颜色,模拟器显示正常
<!--pages/login/login.wxml-->
<view class="container1">
<view>A</view>
<view>B</view>
<view>C</view>
</view>
/* pages/login/login.wxss */
.container1 view{
width: 100px;
height: 100px;
text-align: center;
line-height: 100px;
}
.container1 view:nth-child(1) {
background-color: lightgreen;
}
.container1 view:nth-child(2) {
background-color: lightskyblue;
}
.container1 view:nth-child(3) {
background-color: lightpink;
}
.container1 {
display: flex;
justify-content: space-around;
}
模拟器显示:
手机预览:
https://img-mid.csdnimg.cn/release/static/image/mid/ask/fca2a7548cc0441584129f658c4a3674.jpeg?x-oss-process=image/auto-orient,1/resize,w_320,m_lfit