當我使用反應本地按鈕,我不能STRETCH時它,打擊的是,我使用的按鈕如何拉伸按鈕完全填充容器
myButtonStyle: {
flex: 1,
borderRadius: 5,
alignSelf: 'stretch',
backgroundColor: 5,
borderWidth: 1,
borderColor: '#007aff',
marginRight: 5,
marginLeft: 5
}
和按鈕本身的風格:
<Button
style={myButtonStyle}
title="Learn More"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>
,這是按鈕包裝的風格
myCardSectioStyle: {
borderBottomWidth: 4,
padding: 5,
backgroundColor: '#ffff00',
justifyContent: 'flex-start',
flexDirection: 'row',
borderColor: '#6600ff',
position: 'relative'
}
我們可以看到按鈕坐落在父容器的樣式嗎? – Ohgodwhy
@Ohgodwhy我做了 – farmcommand2