三个按钮宽度总和750,为什么不能铺满屏幕宽?
发布于 6 年前 作者 wlin 3517 次浏览 来自 官方Issues

.b1{

  position:absolute;bottom:0;left:0;width:100rpx;height:160rpx;line-height:160rpx;border-radius:0;

}

.b2{

  position:absolute;bottom:0;left:100rpx;width:550rpx;height:160rpx;line-height:160rpx;border-radius:0;

}

.b3{

  position:absolute;bottom:0;right:0;width:100rpx;height:160rpx;line-height:160rpx;border-radius:0;

}



<button class='b1type='primary'>b1</button>

<button class='b2type='primary'>b2</button>

<button class='b3type='primary'>b3</button>

很奇怪的一个问题,总和750rpx, 但是中间为什么还有缝隙?有人知道吗?

2 回复

rpx是会被换算成px 的 设备750rpx有bug的

在外层加上一个父元素,设置font-size:0试试

回到顶部