IOS与安卓 容器flex布局下,子元素absolute定位显示不一样

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

父容器

display: flex;

flex-direction:row;

justify-content:center;

align-items: center;

position: relative;

width: 80px;

height: 80px;

子元素

position: absolute;

width: 20px;

height: 20px;

在IOS上子元素不居中

在安卓和开发工具上子元素却居中

1 回复
li55
li551 楼5 年前

都absolute了,居中才是不正常的