简体   繁体   English

ScrollView 圆角

[英]ScrollView rounded corners

I made a custom Image swiper withe ScrollView in React Native, but it looks bad when images with rounded corners move.我在 React Native 中使用 ScrollView 制作了一个自定义图像滑动器,但是当带有圆角的图像移动时它看起来很糟糕。 Is there any way to round the corners of the ScrollView?有什么办法可以使 ScrollView 的角变圆吗? Those are my ScrollView styles:这些是我的 ScrollView styles:

style={{
     flexDirection: 'row', alignSelf: 'center',
     width: this.state.imageWidth,
     borderRadius: 20,
}}

ScrollView also inherits styles from ViewStyles so you can pass borderRadius: 20 to it. ScrollView还从ViewStyles继承了 styles,因此您可以将borderRadius: 20传递给它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM