简体   繁体   中英

Two colored circle in React Native without svg or similar (using Views)

is it possible to create a two colored circle in react-native without svg? I made a quick mockup in paint.net so you can see what I exactly want.

双色圆圈样机

Thanks in advance

在此处输入图像描述

 <View style={{ height: 200, width: 200, borderRadius: 100, overflow: 'hidden' }}> <View style={{ backgroundColor: 'red', height: 100, width: 200 }} /> <View style={{ backgroundColor: 'green', height: 100, width: 200 }} /> </View>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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