0
Text
組件字超出了父組件邊界並忽略了祖父填充。在我看來,Text
內容應該在父組件內。 反應原生:文本組件樣式
render() {
return (
<View style={styles.container}>
<View style={styles.importV}>
<View style={styles.serVRow}>
<Image
style={styles.serILeft}
source={require('./img/personYellow.png')}/>
<Text
style={styles.rowTContext}>Why these words is beyond the serVRow style View. The serVRow style View.</Text>
</View>
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'black',
},
hollowWordText: {
color: 'white',
fontSize:52,
},
importV: {
width: width,
backgroundColor: '#fff',
marginBottom: 7,
padding: 15,
},
serVRow: {
flexDirection: 'row',
marginRight: 3,
paddingBottom: 8,
backgroundColor:'#f00'
},
serILeft: {
marginRight: 10,
alignSelf:'center',
},
rowTContext: {
color: "#000",
fontSize: 14,
lineHeight: 20,
backgroundColor:"purple"
},
});