【问题标题】:React native 0.69.1 borderRadius not working properly from top it not show border cssReact native 0.69.1 borderRadius 从顶部无法正常工作它不显示边框 css
【发布时间】:2022-08-19 16:54:15
【问题描述】:

我在我给borderRadius:20查看的屏幕上做了一个视图 顶部边缘的边界半径未显示

我不知道为什么这不起作用

<View style={{height:200,width:200,bordeRadius:20,alignItems:\"center\"}}>
<Text>xyz</Text>
</View>

    标签: javascript css react-native styles styled-components


    【解决方案1】:

    根据文档,您可能需要应用 overflow: 'hidden' 。

    https://reactnative.dev/docs/view-style-props

    溢出:'隐藏'

      <View style={{height:200,width:200,bordeRadius:20,overflow:'hidden',alignItems:"center}}>
        <Text>xyz</Text>
        </View>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-07-13
      • 1970-01-01
      • 1970-01-01
      • 2017-10-13
      • 2018-06-13
      • 2021-10-01
      相关资源
      最近更新 更多