javascript - ScrollView 圆角
问题描述
我在 React Native 中使用 ScrollView 制作了一个自定义的 Image swiper,但是当带有圆角的图像移动时它看起来很糟糕。有什么办法可以使 ScrollView 的角变圆?这些是我的 ScrollView 样式:
style={{
flexDirection: 'row', alignSelf: 'center',
width: this.state.imageWidth,
borderRadius: 20,
}}
解决方案
ScrollView
还继承了样式,ViewStyles
因此您可以传递borderRadius: 20
给它。
推荐阅读
- javascript - 如何通过单击可编辑的 div 然后使用 Jquery 按下键盘上的 Delete 键来删除它?
- javascript - 在 javascript 中将 EventListener 定义为 ul 列表项的问题
- python - 无法在 mac 上安装支持 python3 的 postgres
- c++ - 'g++' 不是内部或外部命令、可运行程序或批处理文件。
- gps - 如何将 gps 模块的实时位置检索到我的数据库中,以便可以在多个应用程序中使用它?
- prolog - 如何获得所有重复列表元素的组合 - 序言
- php - Laravel belongsTo 和 hasMany 不返回数据
- webpack - Webpack url-loader 对图像 url 进行编码,但会破坏文件路径
- android - 为什么 Fragments 会从它们的 Activity 中分离出来?
- node.js - Uncaught SyntaxError: Unexpected token < for JavaScript files