expo react-native 应用程序中的边框半径菜单:如何删除菜单角落的空白区域?
Border radius menu in expo react-native app: how delete white spaces in corners of the menu?
我使用 expo 模板创建应用程序。我想用 border-radius 制作底部菜单,但我有白色 space 而不是页面背景。如何解决?例子见上图
我的 createBottomTabNavigator 样式:
width: '100%',
height: 94,
paddingBottom: 20,
backgroundColor: 'red',
borderTopLeftRadius: 51,
borderTopRightRadius: 51,
borderWidth: 0,
borderColor: '#68a0cf',
overflow: 'hidden'
我的页面(屏幕)样式:
backgroundColor: 'blue',
flex: 1,
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'flex-start'
您应该使用底部选项卡导航器和页面的父容器,并使用 = screenWidth 和 hight = screenHeight 设置样式,并根据需要将背景颜色设为蓝色。
通过这种方式,您将能够摆脱这些空白。
我使用 expo 模板创建应用程序。我想用 border-radius 制作底部菜单,但我有白色 space 而不是页面背景。如何解决?例子见上图
我的 createBottomTabNavigator 样式:
width: '100%',
height: 94,
paddingBottom: 20,
backgroundColor: 'red',
borderTopLeftRadius: 51,
borderTopRightRadius: 51,
borderWidth: 0,
borderColor: '#68a0cf',
overflow: 'hidden'
我的页面(屏幕)样式:
backgroundColor: 'blue',
flex: 1,
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'flex-start'
您应该使用底部选项卡导航器和页面的父容器,并使用 = screenWidth 和 hight = screenHeight 设置样式,并根据需要将背景颜色设为蓝色。
通过这种方式,您将能够摆脱这些空白。