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)
    }


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM