我正在尝试按照本地反应做。我在父视图中设置borderRadius。但孩子最重要的是。所以在最终视图中,borderRadius不可见
export default class FlexDimensionsBasics extends Component {
render() {
return (
// Try removing the `flex: 1` on the parent View.
// The parent will not have dimensions, so the children can't expand.
// What if you add `height: 300` instead of `flex: 1`?
<View style={{flex: 1, borderRadius:30, backgroundColor:'red'}}>
<View style={{flexGrow: 10, backgroundColor: 'powderblue'}} />
<View style={{flexGrow: 20, backgroundColor: 'skyblue'}} />
<View style={{flexGrow: 30, backgroundColor: 'steelblue'}} />
</View>
);
}
}
有什么我想要添加的吗?
将overflow: "hidden"
添加到您的父样式