有没有办法在 react native 中为 View 创建插入阴影?
最佳答案
试试这个:
const styles = StyleSheet.create({
containerStyle: {
borderWidth: 1,
borderRadius: 2,
borderColor: '#ddd',
borderBottomWidth: 0,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.8,
shadowRadius: 2,
elevation: 1,
marginLeft: 5,
marginRight: 5,
marginTop: 10,
}
})
关于react-native - 如何在 react-native - iOS、Android 中为 View 创建插入阴影?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46871254/