gpt4 book ai didi

react-native - 边框不透明度 - React Native

转载 作者:行者123 更新时间:2023-11-28 10:59:10 26 4
gpt4 key购买 nike

我将边框应用于“ View ”,我想知道如何更改边框的不透明度。

<View style={styles.mainContainer}> </View>

mainContainer: {
borderWidth: 2,
borderColor: '#ddd',
....
opacity: 2,
....
}

当我应用上面的样式时,它不起作用。

最佳答案

请尝试使用 borderColor: 'rgba(158, 150, 150, .5)',其中最后一个参数定义不透明度,范围从 0 到 1

关于react-native - 边框不透明度 - React Native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58177909/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com