问题描述
我想在背景中放置几个行星图像,但不能删除透明背景(检查器的图案)。可以看出: current situation
我尝试通过以下方式设置CSS: backgroundColor:“ rgba(0,0)” 如所示:
const MainScreen = (props) => {
return (
<ImageBackground style={styles.backgroundContainer} source={bgImage}>
<View>
<Image
source={require("../assets/images/red_planet.png")}
style={styles.image}
/>
<TouchableOpacity
style={styles.btnLogin}
onPress={() => props.navigation.navigate("sounds")}
>
<Text style={styles.btnText}>SOUNDS</Text>
</TouchableOpacity>
</View>
</ImageBackground>
);
};
const styles = StyleSheet.create({
image: {
width: 200,height: 200,backgroundColor: "rgba(0,0)",}
更新:图像和背景图像均为.png: code snipet
这是与Photoshop关联还是可以与CSS关联? 谢谢你。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)