ReactNative设置 Image容器的 圆角背景

来源:互联网 发布:西安鼓楼网络售票 编辑:程序博客网 时间:2024/05/17 15:06
<View style={[styles.wholeContainer,{height: 102}]}>    <Image style={[styles.cardBgContain,{alignItems: 'center', paddingBottom: 12}]}           source={require('../img/blue_card_bg_s.png')}>  //这个Image控件作背景图    </Image>    <View style={[styles.cardBg,{alignItems: 'center', paddingBottom: 12}]}>        <TouchableWithoutFeedback >            <Image style={styles.portrait}   source={avatarImg}/>        </TouchableWithoutFeedback>        <TouchableWithoutFeedback >            <View>                <Text style={styles.userInfo_no_eAccount_text}>                    .啦啦啦..                </Text>            </View>        </TouchableWithoutFeedback>        <Image  source={require('../img/more_detail_icon.png')}/>    </View></View>
wholeContainer: {    flex: 1,    backgroundColor: Color.White,    alignItems: 'center',    justifyContent: 'flex-end',},cardBg: {//蓝色卡片背景    resizeMode: 'stretch',    width: kCardBgWidth,    alignItems: 'stretch',    flexDirection: 'row',    justifyContent: 'flex-start',    marginBottom: 0,    position: 'absolute',    left: 10,    right: 0,    top: 25,},
cardBgContain: {//卡片容器    resizeMode: 'stretch',    width: kCardBgWidth,    alignItems: 'stretch',    flexDirection: 'row',    justifyContent: 'flex-start',    marginBottom: 0,},


0 0
原创粉丝点击