相关疑难解决方法(0)

React Native绝对定位水平中心

似乎position:absolute在使用中元素不能使用justifyContent或居中alignItems.有一种解决方法可以使用,marginLeft但即使使用尺寸来检测设备的高度和宽度,也不会为所有设备显示相同的解决方法.

  bottom: {
    position: 'absolute',
    justifyContent: 'center',
    alignItems: 'center',
    top: height*0.93,
    marginLeft: width*0.18,
  },
  bottomNav: {
    flexDirection: 'row',
  },
Run Code Online (Sandbox Code Playgroud)

position absolute flexbox react-native

74
推荐指数
5
解决办法
7万
查看次数

标签 统计

absolute ×1

flexbox ×1

position ×1

react-native ×1