react-native StyleSheet 属性和选项列表
List of react-native StyleSheet properties and options
我一直在网上搜索所有可能的 react-native StyleSheet 选项及其值的列表。找不到,有没有人link这样的文档?
它们在这里,按组件类型分隔:
您在文档中看到枚举的位置,例如在文本样式文档页面上:
fontStyle enum('normal', 'italic')
fontWeight enum("normal", 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')
这些通常与您在网络上找到的 css 属性非常相似。
更新
正如@muhammad-hannan 在下面的回答,您还可以找到 the full layout properties list there。
我知道这个问题已经得到解答,但自从上次更新以来,事情已经发生了变化。更新后的样式表属性可以在下面找到,现在称为布局道具:
https://facebook.github.io/react-native/docs/layout-props.html
布局Props
列表:
marginHorizontal
alignContent
alignSelf
aspectRatio
borderBottomWidth
borderEndWidth
borderLeftWidth
borderRightWidth
borderStartWidth
borderTopWidth
borderWidth
bottom
display
end
flex
flexBasis
flexDirection
flexGrow
flexShrink
flexWrap
height
justifyContent
left
margin
marginBottom
marginEnd
alignItems
marginLeft
marginRight
marginStart
marginTop
marginVertical
maxHeight
maxWidth
minHeight
minWidth
overflow
padding
paddingBottom
paddingEnd
paddingHorizontal
paddingLeft
paddingRight
paddingStart
paddingTop
paddingVertical
position
right
start
top
width
zIndex
direction
我一直在网上搜索所有可能的 react-native StyleSheet 选项及其值的列表。找不到,有没有人link这样的文档?
它们在这里,按组件类型分隔:
您在文档中看到枚举的位置,例如在文本样式文档页面上:
fontStyle enum('normal', 'italic')
fontWeight enum("normal", 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900')
这些通常与您在网络上找到的 css 属性非常相似。
更新
正如@muhammad-hannan 在下面的回答,您还可以找到 the full layout properties list there。
我知道这个问题已经得到解答,但自从上次更新以来,事情已经发生了变化。更新后的样式表属性可以在下面找到,现在称为布局道具:
https://facebook.github.io/react-native/docs/layout-props.html
布局Props
列表:
marginHorizontal alignContent alignSelf aspectRatio borderBottomWidth borderEndWidth borderLeftWidth borderRightWidth borderStartWidth borderTopWidth borderWidth bottom display end flex flexBasis flexDirection flexGrow flexShrink flexWrap height justifyContent left margin marginBottom marginEnd alignItems marginLeft marginRight marginStart marginTop marginVertical maxHeight maxWidth minHeight minWidth overflow padding paddingBottom paddingEnd paddingHorizontal paddingLeft paddingRight paddingStart paddingTop paddingVertical position right start top width zIndex direction