反应本机透明文本

时间:2019-01-21 22:51:55

标签: javascript react-native

我需要达到以下效果 button with transparent text

我的代码片段:

                     <ImageBackground source={require('...')}>
                        <View style={[styles.buttonView, {flex: 2, backgroundColor: 'white'}]}>
                            <TouchableOpacity activeOpacity={0.6}>
                                <View style={{paddingTop: 15, paddingBottom: 15}}>
                                    <Text style={[styles.textItem, {fontWeight: "bold", color: 'transparent'}]}>
                                        Kobieta
                                    </Text>
                                </View>
                            </TouchableOpacity>
                        </View>
                      </ImageBackground>

但是当前按钮中的文本为白色。

1 个答案:

答案 0 :(得分:0)

尝试设置backgroundColor:'transparent'而不是颜色。

相关问题