我想知道为什么我在react native的文本中会出现这些奇怪的padding
.我try 了各种方法来获得一个完美的文本,但似乎没有任何效果.唯一有效的方法是paddingVertical
和paddingHorizontal
,但它太粗糙,不可靠.
<Text numberOfLines={1}
style={{
backgroundColor: 'red',
lineHeight: 92,
textAlign: 'center',
textAlignVertical: 'center',
padding: 0,
margin: 0,
fontSize: 92,
color: '#2d76ff',
fontFamily: 'Roboto-Regular',
includeFontPadding: false}}>
{this.state.documents}
</Text>
Zeplin
Screenshot from my HTC