gpt4 book ai didi

react-native - 如何在 Native Base 中删除页眉的底线和页脚的顶线?

转载 作者:行者123 更新时间:2023-12-04 04:54:54 24 4
gpt4 key购买 nike

as the image can show it ,我的应用程序在页脚顶部和页眉底部显示一条线。它在 Native Base 中似乎很常见。我已经检查了 native-base 主题,但我找不到一些来修复这个错误。

代码:

import React, { Component } from 'react';
import { Container, Content, Footer, FooterTab, Button, Icon, Text, Header, Title, Left, Right, Body, } from 'native-base';
export default class FooterTabsExample extends Component {
render() {
return (
<Container>
<Header>
<Left>
<Button transparent>
<Icon name='arrow-back' />
</Button>
</Left>
<Body>
<Title>Header</Title>
</Body>
<Right>
<Button transparent>
<Icon name='menu' />
</Button>
</Right>
</Header>
<Content style={{backgroundColor:'black'}}/>

<Footer >
<FooterTab>
<Button>
<Icon name="apps" />
<Text>Apps</Text>
</Button>
<Button>
<Icon name="camera" />
<Text>Camera</Text>
</Button>
<Button active>
<Icon active name="navigate" />
<Text>Navigate</Text>
</Button>
<Button>
<Icon name="person" />
<Text>Contact</Text>
</Button>
</FooterTab>
</Footer>
</Container>
);
}
}

最佳答案

只需覆盖 borderBottomWidthHeaderborderTopWidthFooter :

<Header style={{borderBottomWidth: 0}}>
...
</Header>

...

<Footer style={{borderTopWidth: 0}}>
...
</Footer>

关于react-native - 如何在 Native Base 中删除页眉的底线和页脚的顶线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42989251/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com