IOS与安卓 容器flex布局下,子元素absolute定位显示不一样
发布于 6 年前 作者 bdeng 4036 次浏览 来自 问答

父容器

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 回复

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

回到顶部