提问人:Rahma 提问时间:10/20/2023 最后编辑:Rahma 更新时间:10/20/2023 访问量:29
使用 svg 扩展 uri 作为 react native 的背景图像
Use svg extension uri as a background image with react native
问:
我正在尝试使用 svg 扩展名 Uri 设置背景图像,
使用 ImageBackground 时,图像不显示。 我也尝试了react-native-svg 但是 uri 未被识别为属性(编译错误)
有什么解决办法吗?
导入 SvgUri,来自“react-native-svg”; import { Image, ImageBackground, StyleSheet, Text, View } from “react-native”;
<SvgUri
width={100}
height={100}
uri="https://xx.svg"
/>
<ImageBackground
source={{ uri: backgroundImage }}
style={styles.background} >
</ImageBackground>
答: 暂无答案
评论