收藏
回答

view组件webview模式下正常,skyline模式下时,border被显示出来,怎么去掉?

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/* 清除边框 */
  margin0 !important;    /* 清除边距 */
  padding0 !important;  /* 清除内边距 */
  border-style: none;
}
.camera-box {
  width100vw;
  height100vh;
  position: absolute;
  top110rpx;
  left0rpx;
}
.gray-mask {
  width100vw;
  height100vh;
  display: flex;
  flex-direction: column;
}
.gray-mask-top {
  min-height20%;
  backgroundrgb(0000.5);
}
.gray-mask-center {
  min-height40%;
  display: flex; 
  flex-direction: row;
  flex1 1 0;
}
.gray-mask-bottom {
  min-height40%;
  flex-grow2;
  backgroundrgb(0000.5);
  display: flex;
  flex-direction: column;
}
.content{
  min-height30%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
}
.left-right {
  min-width20%;
  backgroundrgb(0000.5);
}
.center {
  min-width60%;
  display: flex;
  flex-direction: column;
}
.center-up {
  min-height450rpx;
}
.center-down {
  flex1;
  backgroundrgb(0000.5);
  font-size28rpx;
  font-weight400;
  color:white;
  display: flex;
  align-items: center;  
  justify-content: center;
}
回答关注问题邀请回答
收藏

1 个回答

  • Eric Huang
    Eric Huang
    星期四 14:51

    不是 border,是因为像素对齐导致的,相当于各个 view 之间没有对齐到物理像素网格,中间有缝隙。 看是否可以把背景放到后面来规避下

    星期四 14:51
    有用 1
    回复 1
    • 21天
      21天
      星期四 15:47
      除了把背景放到后面规避外,还有其它办法解决吗
      星期四 15:47
      回复
登录 后发表内容