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