css - 设计问题按钮 React Native
问题描述
我正在尝试让这个设计按钮在此处输入图像描述,但我不知道如何制作。有任何想法吗?这是我的实际设计:在此处输入图像描述
这是我的代码:
<View style={styles.containerButtons}>
<Card style={styles.cardButtonLeft}>
<TouchableHighlight style={styles.button} onPress={()=> {}}><FontAwesome5 style={{}} name="heart" color={Colors.background} size={40}/></TouchableHighlight>
</Card>
<Card style={styles.cardButtonRight}>
<TouchableHighlight style={styles.button} onPress={()=> {}}><Octicons style={{}} name="zap" color={Colors.background} size={45}/></TouchableHighlight>
</Card>
</View>
和风格:
containerButtons:{
alignItems:'center',
marginBottom: 30,
flexDirection: 'row',
justifyContent:'center'
},
cardButtonLeft:{
marginHorizontal: 20,
width: '20%',
alignItems:'center',
flexDirection:'row',
justifyContent:'space-around',
borderRadius: 100,
transform:[{translateX: 30}]
},
cardButtonRight:{
marginHorizontal: 20,
width: '20%',
alignItems:'center',
flexDirection:'row',
justifyContent:'space-around',
borderRadius: 100,
transform:[{translateX: -30}]
},
button:{
margin: 15,
flex: 1,
alignItems:'center',
borderRadius:15
}
解决方案
推荐阅读
- android - 无法解决:zxing 库
- php - 使用 PHP 编辑另一个 PHP 脚本并定位给定方法
- imagemagick - 由于 x11,Animate cmd 失败
- amazon-web-services - 如何在cloudformation中使用一个模板部署多个堆栈
- go - 带两位小数的 Float64
- firebase - 创建 Firebase CustomToken 的 Javascript 函数
- automation - 如何开始在 Arduino IDE 中编写 OPC UA 客户端的代码以在 ESP32 中使用它?
- html - css中宽度百分比和像素有什么区别
- java - 如何解决 Eclipse 中 Android 应用程序的 Maven 配置问题?
- sql-server - 如何使用c#在for循环中调用存储过程