view难道有bug,还是我代码有问题,只改变位置会导致宽度不一样?
<view class= "mune_interface" > <view class= "ispublish_style" ></view> <view class= "line01" ></view>
.wxss文件 .mune_interface { margin-left: 150rpx; margin-right: 150rpx; height: 210rpx; width: 450rpx; } .ispublish_style { margin-top: 5rpx; height: 200rpx; width: 200rpx; background-color: #9f0; float: left; display: flex; } .line01 { margin-left: 22rpx; height: 210rpx; width: 6rpx; background-color: #000; float: left; display: flex;
|
当把line01里改为 margin-left : 0rpx。效果如下
当把line01里改为margin-left: 30rpx。效果如下
说明:就是22rpx有问题,其他情况都正常