view组件在webview模式下正常,skyline模式下时,border被显示出来,无法隐藏
代码片段:https://developers.weixin.qq.com/s/Gii0FXmm7GYf
.wxml代码
<view class="camera-box">
<view class="gray-mask">
<view class="gray-mask-top">
</view>
<view class="gray-mask-center">
<view class="left-right"></view>
<view class="center">
<view class="center-up"></view>
<view class="center-down">操作中心</view>
</view>
<view class="left-right"></view>
</view>
<view class="gray-mask-bottom">
<view class="content">1号 </view>
<view class="content">2号</view>
</view>
</view>
</view>
.wxss代码
view {
border: none !important; /* 清除边框 */
margin: 0 !important; /* 清除边距 */
padding: 0 !important; /* 清除内边距 */
border-style: none;
}
.camera-box {
width: 100vw;
height: 100vh;
position: absolute;
top: 110rpx;
left: 0rpx;
}
.gray-mask {
width: 100vw;
height: 100vh;
display: flex;
flex-direction: column;
}
.gray-mask-top {
min-height: 20%;
background: rgb(0, 0, 0, 0.5);
}
.gray-mask-center {
min-height: 40%;
display: flex;
flex-direction: row;
flex: 1 1 0;
}
.gray-mask-bottom {
min-height: 40%;
flex-grow: 2;
background: rgb(0, 0, 0, 0.5);
display: flex;
flex-direction: column;
}
.content{
min-height: 30%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: white;
}
.left-right {
min-width: 20%;
background: rgb(0, 0, 0, 0.5);
}
.center {
min-width: 60%;
display: flex;
flex-direction: column;
}
.center-up {
min-height: 450rpx;
}
.center-down {
flex: 1;
background: rgb(0, 0, 0, 0.5);
font-size: 28rpx;
font-weight: 400;
color:white;
display: flex;
align-items: center;
justify-content: center;
}
不是 border,是因为像素对齐导致的,相当于各个 view 之间没有对齐到物理像素网格,中间有缝隙。 看是否可以把背景放到后面来规避下