一、hairlineWidth: 自适应不同设备生成一条线
var styles = StyleSheet.create({ separator: { borderBottomColor: '#bbb', borderBottomWidth: StyleSheet.hairlineWidth, }, });
二、adsoluteFill:
const styles = StyleSheet.create({ wrapper: { ...StyleSheet.absoluteFill, top: 10, backgroundColor: 'transparent', }, });
相当于以下代码的缩写:
position: 'absolute', left: 0, right: 0, top: 0, bottom: 0