transform ios和安卓位置不一

发布于 7 年前作者 ping7313726 次浏览最后编辑 7 年前来自 ask

很简单的布局,如下

但是在安卓上确实这样的表现.- -

明显不居中

代码如下:

外部淡蓝圆圈

.int_tShow {

  position: relative;
  top: 0;
  left: 0;
  width: 48rpx;
  height: 48rpx;
  border-radius: 50%;
  background: #9cbcff

}



内部深蓝圆圈

.int_ttShow {

position: absolute;

top:50%;

left: 50%;

transform: translate(-50%, -50%);

width: 32rpx;

height: 32rpx;

border-radius: 50%;

background: #5084ef;

}



不同安卓机型偏差不同! 请赐教

0 回复
暂无回复