跳到主要内容
新架构实战课 实操 + 基建 + 原理全维度包揽,抢先掌握 React Native 新架构精髓 立即查看 >Version: Next

View 样式属性

示例

文档

Props

borderRightColor

类型必需
color

backfaceVisibility

类型必需
enum('visible', 'hidden')

borderBottomColor

类型必需
color

borderBottomEndRadius

类型必需
number

borderBottomLeftRadius

类型必需
number

borderBottomRightRadius

类型必需
number

borderBottomStartRadius

类型必需
number

borderBottomWidth

类型必需
number

borderColor

类型必需
color

borderEndColor

类型必需
color

borderLeftColor

类型必需
color

borderLeftWidth

类型必需
number

borderRadius

类型必需
number

backgroundColor

类型必需
color

borderRightWidth

类型必需
number

borderStartColor

类型必需
color

borderStyle

类型必需
enum('solid', 'dotted', 'dashed')

borderTopColor

类型必需
color

borderTopEndRadius

类型必需
number

borderTopLeftRadius

类型必需
number

borderTopRightRadius

类型必需
number

borderTopStartRadius

类型必需
number

borderTopWidth

类型必需
number

borderWidth

类型必需
number

opacity

类型必需
number

elevation

(限 Android)使用 Android 原生的 elevation API 来设置视图的高度( elevation API)。这样可以为视图添加一个投影,并且会影响视图层叠的顺序。此属性仅支持 Android5.0 及以上版本。

类型必需平台
numberAndroid