Mak*_*sim 58 javascript reactjs react-native
如何在React Native中仅使用1个角的边界半径?
我有一个模态窗口
正如你可以看到底角没有圆角,当我使用backgroundColor按钮时会发生这种情况.我试图将溢出设置隐藏到模态包装器,它没有帮助我.现在我想使用边框半径到按钮(仅适用于1个角).
Mat*_*olo 186
你有没有试过以下?
- borderBottomLeftRadius
:number
- borderBottomRightRadius
:number
- borderTopLeftRadius
:number
- borderTopRightRadius
:number
此外,您还可以在视图组件文档中找到更多信息.
小智 15
这对我有用.
谢谢
小智 7
<View style={styles.imgBox}>
<Image source={{ uri: 'your image url' }} style={styles.img} />
</View>
const styles = EStyleSheet.create({
imgBox: {
width: px(72),
height: px(72),
borderBottomLeftRadius: 2,
borderTopLeftRadius: 2,
overflow: 'hidden',
},
img: {
width: px(72),
height: px(72),
},
})
Run Code Online (Sandbox Code Playgroud)
对于ios来说看起来不错。
归档时间: |
|
查看次数: |
56658 次 |
最近记录: |