我成功地删除了elevation: 0
的阴影elevation: 0
按钮的样式为elevation: 0
。
I don't think thats possible. If you don't need a button elevation (shadow), you may create your own react-native button using using Touchables(TochableOpacity, TochableHighlight, TouchableWithoutFeedback). And it's not a big deal.
Please refer to the docs .
renderButton = () => {
return (
<TouchableOpacity onPress={this._onPressButton}>
<ImageBackground style={styles.button} source={require('./myButton.png')} >
<Text>Press me</Text>
</ImageBackground>
</TouchableOpacity>
);
}
关于使用css
删除阴影怎么样?
style="box-shadow: 0px 0px 0p;"
you can't use style="box-shadow: 0px 0px 0p;" at all there is multi way to approach this i personal use elevation: 0
if you use router-flux for navigation pls consider that icons appear with shadow just on android but no shadow exist for ios version by default
以下代码将删除按钮阴影
style = {{ elevation: 0 }}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.