我正在尝试实现类似于使用box-shadow可以实现的框内阴影:CSS中的插入.我试过以下,但我不能让阴影更突出和更暗.https://rnplay.org/apps/EHvL4g
var styles = StyleSheet.create({
container: {
flex: 1,
},
box: {
margin: 20,
flex: 1,
backgroundColor: 'transparent',
borderColor: 'white',
borderWidth: 1,
overflow: 'hidden',
shadowColor: 'black',
shadowRadius: 10,
shadowOpacity: 1,
},
});
Run Code Online (Sandbox Code Playgroud)
增加边框宽度。
box: {
margin: 10,
flex: 1,
backgroundColor: 'transparent',
borderColor: 'white',
borderWidth: 30,
overflow: 'hidden',
shadowColor: 'black',
shadowRadius: 10,
shadowOpacity: 1,
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8339 次 |
| 最近记录: |