react-native - 反应导航选项卡不可点击的绝对位置
问题描述
我有 2 个屏幕反应原生,我想让标签导航器透明,它可以工作,但添加后导航器不可点击position: absolute
,如果我不使用绝对背景变白(不能透明)
这是我的 tabBarOptions
tabBarOptions: {
showIcon: true,
showLabel: true,
activeTintColor: 'orange',
inactiveTintColor: '#fff',
style: {
width: '100%',
height: 60,
backgroundColor: 'transparent',
borderTopWidth: 0,
position: 'absolute',
left: 0,
right: 0,
bottom: 10,
},
tabStyle: {
paddingTop: 20,
},
},
当我点击Create Order
标签时没有任何反应,但如果我评论position: absolute
它是完美的工作。
解决方案
在标签栏样式中添加“zIndex=1”
style: {
width: '100%',
height: 60,
backgroundColor: 'transparent',
borderTopWidth: 0,
position: 'absolute',
zIndex: 1,
left: 0,
right: 0,
bottom: 10,
},
推荐阅读
- r - 如何在传单 addPolylines 中绘制 MULTILINESTRING?
- spring-boot - Spring sleuth with SpringBoot(日志相关) - Traceid & SpanId 未显示
- java - 如何在java中用字符替换整数数组
- php - 如何从联系表单 7 中获取字段值并将其传递给重定向 url?
- python - pandas 更新值失败,只取总数的一部分
- python - Python:如何在字符串中搜索重复的字符串
- java - Java Future 的重复超时导致 JVM 内存不足
- bash - 检查已安装的配置文件无法识别匹配的名称
- tomcat - Tomcat显示旧版本的txt文件,删除工作目录,重新启动,检查......它仍然是旧文件
- docker - 如何使用 Ansible 启动 Docker 容器