最近我尝试了很多在react native中画一个半椭圆但是我没有得到任何好的结果。这是我试过的
semiEllipse:{
width: '100%',
height: 50,
borderRadius: 0.7*width,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0,
backgroundColor: 'red',
}
但这不是我要实现的目标,因为你们可以看到这不是一个纯椭圆。
请帮我解决这个问题。提前致谢!
最佳答案
width: 100,
height: 100,
backgroundColor: 'red',
borderRadius: 50,
transform: [
{scaleX: 2}
]
这应该给你一个椭圆形。然后我会做一个负边距和溢出:隐藏在父级上。
关于css - 如何在 React Native 中绘制半椭圆?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54076135/