【发布时间】:2020-06-22 23:27:10
【问题描述】:
我正在使用 Native Base 选项卡,如下所示:
<ImageBackground
source={{uri:imageURl}}
style={{ flex: 1 }}
resizeMode="cover">
<Tabs tabBarUnderlineStyle={{ backgroundColor: "#000000" }}
style={{backgroundColor:'transparent'}}>
<Tab heading={'Tab 1'}>
<View style={{flex:1,backgroundColor:'transparent'}}>
<Text>Tab 1 content</Text>
</View>
</Tab>
</Tabs>
<Tabs tabBarUnderlineStyle={{ backgroundColor: "#000000" }}>
<Tab heading={'Tab 2'}>
<View style={{flex:1,backgroundColor:'transparent'}}>
<Text>Tab 2 content</Text>
</View>
</Tab>
</Tabs>
</ImageBackground>
选项卡的内容具有透明背景,因此它应该是作为父图像背景的图像,但它具有白色,当我将选项卡内视图中的透明更改为红色时,它改变了!我还尝试删除标签并添加文本,而不是正常看到背景。 问题是:如何使Tab的内容透明而不是白色。 这是零食的例子:Native Base Tabs
【问题讨论】: