样式表属性
边框宽度
- borderBottomWidth 底部边框宽度.
- borderLeftWidth 左边边框宽度.
- borderRightWidth 右边边框宽度.
- borderTopWidth 顶部边框宽度.
- borderWidth 所有边框宽度.
边框颜色
- borderBottomColor 边框颜色.
- borderColor 边框颜色.
- borderStyle 边框类型.
- borderLeftColor 边框颜色.
- borderRightColor 边框颜色.
- borderTopColor 边框颜色.
边框圆角
- borderBottomLeftRadius 边框圆角.
- borderBottomRightRadius 边框圆角.
- borderTopLeftRadius 边框圆角.
- borderTopRightRadius 边框圆角.
- borderRadius 边框圆角.
阴影相关
字体相关
- color 字体颜色.
- fontFamily 字体族.
- fontSize 字体大小.
- fontStyle 字体样式,正常,倾斜等,值为enum('normal', 'italic').
- fontWeight 字体粗细,值为enum("normal", 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900').
- letterSpacing 字符间隔.
- lineHeight 行高.
- textAlign 字体对齐方式,值为enum("auto", 'left', 'right', 'center', 'justify').
- textDecorationLine 字体修饰线,上划线,下划线,删除线,无修饰,.
- textDecorationColor 修饰线颜色.
- textDecorationStyle 修饰线类型 enum("solid", 'double', 'dotted', 'dashed').
- writingDirection 书写方向
外边距
- margin 外边距.
- marginBottom 底部外边距.
- marginHorizontal 水平外边距.
- marginLeft 左外边距.
- marginRight 右外边距.
- marginTop 顶部外边距.
- marginVertical 垂直外边距.
内边距
- padding 内边距.
- paddingBottom 底部内边距.
- paddingHorizontal 水平内边距.
- paddingLeft 左内边距.
- paddingRight 右内边距.
- paddingTop 顶部内边距.
- paddingVertical 垂直内边距.
容积的属性:
- flex-direction 主轴方向,row|row-reverse|column|column-reverse
- flex-wrap 换行、折行,nowrap(不换行,默认) | wrap(换行) | wrap-reverse(反方向换行)
- flex-flow flex-direction, flex-wrap的组合,默认值row nowrap
- justify-content 属性定义了项目在主轴上的对齐方式flex-start | flex-end | center | space-between | space-around
- align-items 属性定义项目在交叉轴上如何对齐flex-start | flex-end | center | baseline | stretch
- align-content属性定义了多根轴线的对齐方式。如果项目只有一根轴线,该属性不起作用
项目属性:
- flexflex属性是flex-grow, flex-shrink 和 flex-basis的简写,默认值为0 1 auto
- order属性定义项目的排列顺序。数值越小,排列越靠前,默认为0。
- flex-grow属性定义项目的放大比例,默认为0
- flex-shrink属性定义了项目的缩小比例,默认为1
- flex-basisflex-basis属性定义了在分配多余空间之前,项目占据的主轴空间(main size)
- align-self属性允许单个项目有与其他项目不一样的对齐方式,可覆盖align-items属性。默认值为auto,表示继承父元素的align-items属性,如果没有父元素,则等同于stretch
旋转变换
其他
- position 定位 属性值为absolute和relative.
- tintColor
- opacity 透明度.
- backgroundColor 背景颜色.
- overflow 超出部分是否显示 enum('visible', 'hidden').
- backfaceVisibility 属性定义当元素不面向屏幕时是否可见
- resizeMode 类似于oc中contentModel,cover:等比拉伸、strech:保持原有大小、contain:图片拉伸 充满空间