【发布时间】:2022-10-08 15:28:59
【问题描述】:
我是新来的反应本地人。我正在尝试对我创建的餐厅组件应用阴影效果。不幸的是,我无法让阴影生效。所有其他造型作品。我在这个项目中使用了顺风 css。顺风配置没问题。唯一的问题是到目前为止的阴影。我尝试将阴影应用于其他组件,但结果相同,没有观察到任何效果。我哪里错了或者我没有看到什么。
<TouchableOpacity className="bg-white mr-3 shadow">
<Image
source={{
uri: imgUrl,
}}
className="h-36 w-36 rounded-sm"
/>
<View>
<Text className="font-bold text-lg pt-2">{title}</Text>
<View className="flex-row items-center space-x-1">
<StarIcon color="green" opacity={0.5} size={22} />
<Text className="text-xs text-gray-500">
<Text className="text-green-500">{rating}</Text> : {genre}
</Text>
</View>
<View className="flex-row items-center space-x-1">
<LocationMarkerIcon color="gray" size={22} opacity={0.4}/>
<Text className="text-xs text-gray-500"> Nearby : {address}</Text>
</View>
</View>
</TouchableOpacity>
【问题讨论】:
标签: javascript react-native tailwind-css