在哪里可以找到reactnative支持的所有样式属性列表

在哪里可以获得 React Native 支持的每种组件类型的样式属性列表?

在哪里可以获得 React Native 支持的每种组件类型的样式属性列表?

44

这是一个备忘单:

React Native Styling Cheat Sheet

支持的样式在每个组件的文档中。下面是ViewText组件的链接:

View:https://reactnative.dev/docs/view#style Text:https://reactnative.dev/docs/text#style

请注意,在文本样式的顶部显示视图样式道具...,这意味着它还支持(大多数)View支持的样式。

15

我从反应本机日志中提取了有效样式的列表。

下面的集合帮助我在正常工作很多。

[
  "alignContent",
  "alignItems",
  "alignSelf",
  "aspectRatio",
  "backfaceVisibility",
  "backgroundColor",
  "borderBottomColor",
  "borderBottomLeftRadius",
  "borderBottomRightRadius",
  "borderBottomWidth",
  "borderColor",
  "borderLeftColor",
  "borderLeftWidth",
  "borderRadius",
  "borderRightColor",
  "borderRightWidth",
  "borderStyle",
  "borderTopColor",
  "borderTopLeftRadius",
  "borderTopRightRadius",
  "borderTopWidth",
  "borderWidth",
  "bottom",
  "color",
  "decomposedMatrix",
  "direction",
  "display",
  "elevation",
  "flex",
  "flexBasis",
  "flexDirection",
  "flexGrow",
  "flexShrink",
  "flexWrap",
  "fontFamily",
  "fontSize",
  "fontStyle",
  "fontVariant",
  "fontWeight",
  "height",
  "includeFontPadding",
  "justifyContent",
  "left",
  "letterSpacing",
  "lineHeight",
  "margin",
  "marginBottom",
  "marginHorizontal",
  "marginLeft",
  "marginRight",
  "marginTop",
  "marginVertical",
  "maxHeight",
  "maxWidth",
  "minHeight",
  "minWidth",
  "opacity",
  "overflow",
  "overlayColor",
  "padding",
  "paddingBottom",
  "paddingHorizontal",
  "paddingLeft",
  "paddingRight",
  "paddingTop",
  "paddingVertical",
  "position",
  "resizeMode",
  "right",
  "rotation",
  "scaleX",
  "scaleY",
  "shadowColor",
  "shadowOffset",
  "shadowOpacity",
  "shadowRadius",
  "textAlign",
  "textAlignVertical",
  "textDecorationColor",
  "textDecorationLine",
  "textDecorationStyle",
  "textShadowColor",
  "textShadowOffset",
  "textShadowRadius",
  "tintColor",
  "top",
  "transform",
  "transformMatrix",
  "translateX",
  "translateY",
  "width",
  "writingDirection",
  "zIndex"
]

实现细节在这里:https://github.com/vhpoet/react-native-styling-cheat-sheet/blob//README.md

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(388)
Regex可匹配 WebHarvy的电话和传真号码
上一篇
如何创建Windows10设置应用程序(沉浸式控制面板)小程序
下一篇

相关推荐

发表评论

登录 后才能评论

评论列表(43条)