安卓border-width设置为0仍然有很细的边框
发布于 5 年前 作者 swei 613 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

使用了box-sizing:border-box; 设置了左边框为0,或者为none,依然有一条很细的边框。

  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo
<view class="box">
<view wx:for="{{4}}" class="border">
  <view class="item"></view>
</view>
</view>
.box{
  padding:20px 0;
  display: flex;
  justify-content: center;
  background-color: pink;
}
.border{
  
  border-left:1px solid #eee;
  border-top:1px solid #eee;
  box-sizing: border-box;
}
 
.border:nth-of-type(3){
  border-left:none;
  /* border-left-width:0; */
}
 
.item{
  width:60px;
  height:60px;
  background-color: #ff6919;
}
1 回复

没有问题啊  第三个border容器的左边框没有了啊

回到顶部