作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
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>
);
}
}
最佳答案
只需覆盖 borderBottomWidth
为 Header
和 borderTopWidth
为 Footer
:
<Header style={{borderBottomWidth: 0}}>
...
</Header>
...
<Footer style={{borderTopWidth: 0}}>
...
</Footer>
关于react-native - 如何在 Native Base 中删除页眉的底线和页脚的顶线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42989251/
我是一名优秀的程序员,十分优秀!