我需要那个按钮来反应原生......可能吗?
我需要在点击按钮后设置按动画,如下面的url ..
https://www.w3schools.com/css/tryit.asp?filename=trycss_buttons_animate3
答案 0 :(得分:1)
您必须为View
提供提升道具<View elevation={5} style={styles.container}>
<Text>Hello World !</Text>
</View>
可以像这样添加样式:
const styles = StyleSheet.create({
container:{
padding:20,
backgroundColor:'#d9d9d9',
shadowColor: "#000000",
shadowOpacity: 0.8,
shadowRadius: 2,
shadowOffset: {
height: 1,
width: 1
}
},
})