react-native 支持的样式表 不支持多值属性

react-native 没有实现完整的css属性(请注意,非常重要,你会遇到如下场景:无法使用margin: '10px 10px' 或者padding等等其他css多组合属性,因为react-native 没有实现,你只能一个一个的写= =、),它支持StyleSheet创建css样式。

所支持样式如下:

Valid style props: [

  "alignItems",

  "alignSelf",

  "backfaceVisibility",

  "backgroundColor",

  "borderBottomColor",

  "borderBottomLeftRadius",

  "borderBottomRightRadius",

  "borderBottomWidth",

  "borderColor",

  "borderLeftColor",

  "borderLeftWidth",

  "borderRadius",

  "borderRightColor",

  "borderRightWidth",

  "borderStyle",

  "borderTopColor",

  "borderTopLeftRadius",

  "borderTopRightRadius",

  "borderTopWidth",

  "borderWidth",

  "bottom",

  "color",

  "elevation",

  "flex",

  "flexDirection",

  "flexWrap",

  "fontFamily",

  "fontSize",

  "fontStyle",

  "fontWeight",

  "height",

  "justifyContent",

  "left",

  "letterSpacing",

  "lineHeight",

  "margin",

  "marginBottom",

  "marginHorizontal",

  "marginLeft",

  "marginRight",

  "marginTop",

  "marginVertical",

  "maxHeight",

  "maxWidth",

  "minHeight",

  "minWidth",

  "opacity",

  "overflow",

  "padding",

  "paddingBottom",

  "paddingHorizontal",

  "paddingLeft",

  "paddingRight",

  "paddingTop",

  "paddingVertical",

  "position",

  "resizeMode",

  "right",

  "rotation",

  "scaleX",

  "scaleY",

  "shadowColor",

  "shadowOffset",

  "shadowOpacity",

  "shadowRadius",

  "textAlign",

  "textDecorationColor",

  "textDecorationLine",

  "textDecorationStyle",

  "tintColor",

  "top",

  "transform",

  "transformMatrix",

  "translateX",

  "translateY",

  "width",

  "writingDirection"  

]

猜你喜欢

转载自blog.csdn.net/hzxOnlineOk/article/details/90241494