reactnative开发ReactNative写三⾓形reactNative
业务中⽓泡常⽤三⾓写法:
<View style={styles.arrow}>
</View>
arrow: {
width: getRpx(30),
height: getRpx(30),
borderWidth: getRpx(15),
borderTopColor: 'transparent',
borderRightColor: 'transparent',
borderBottomColor: 'transparent',
borderLeftColor: '#262626',
justifyContent: 'center',
alignItems: 'center',
}
导航常⽤三⾓写法:
<View style={styles.arrow}>
<View style={styles.inArrow}></View>
</View>
arrow: {
width: getRpx(30),
height: getRpx(30),
borderWidth: getRpx(15),
borderTopColor: 'transparent',
borderRightColor: 'transparent',
borderBottomColor: 'transparent',
borderLeftColor: '#262626',
justifyContent: 'center',
alignItems: 'center',
}
inArrow: {
width: getRpx(22),
height: getRpx(22),
borderWidth: getRpx(11),
borderTopColor: 'transparent',
borderRightColor: 'transparent',
borderBottomColor: 'transparent',
borderLeftColor: '#fff',
position: 'absolute',
left: getRpx(-12),
top: getRpx(-9)
}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论