React Native View Style
来源:互联网 发布:淘宝买家秀大尺度店铺 编辑:程序博客网 时间:2024/04/27 16:55
转自http://www.cnblogs.com/suxun/archive/2016/02/27/5222175.html
ReactNative之style使用指南
- ReactNative中能使用的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",
"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"]
- style使用内连方式 style={{flex:1,borderColor:'red'}}
- style包裹使用style={[styles.style1,styles.style2]}
- 同时包裹样式和内连style={[styles.style1,{flex:1,borderWidth:1}]}
StyleSheet提供了一种类似CSS样式表的抽象。
创建一个样式表:
var styles = StyleSheet.create({ container: { borderRadius: 4, borderWidth: 0.5, borderColor: '#d6d7da', }, title: { fontSize: 19, fontWeight: 'bold', }, activeTitle: { color: 'red', },});
使用一个样式表:
<View style={styles.container}> <Text style={[styles.title, this.props.isActive && styles.activeTitle]} /></View>
- React Native View Style
- React Native 之 Style
- React Native 指定 style
- react-native 之style
- React Native style属性重载
- react-native-scrollable-tab-view Cannot read property 'style' of undefined问题
- 引用react-native-scrollable-tab-view 之后Cannot read property 'style' of undefined问题
- React native (4)--props、state、style、布局
- React-Native基础_2.样式Style
- 探究react native的View
- React Native 之 View使用
- React Native View组件实例
- React:react-native-scrollable-tab-view
- React-Native滑动删除react-native-swipe-list-view
- [React Native]react-native-scrollable-tab-view(入门篇)
- [React Native]react-native-scrollable-tab-view(进阶篇)
- React Native之react-native-scrollable-tab-view详解
- [React Native]react-native-scrollable-tab-view(入门篇)
- [完]Linux 修改主机名
- FragmentPagerAdapter与FragmentStateAdapter的区别
- ssh默认端口修改
- fragment fragment 通信
- Intel汇编语言程序设计学习-第六章 条件处理-下
- React Native View Style
- 公路修建
- bzoj1419(期望与DP)
- windows绑定应用程序快捷方式到鼠标右键
- MAC系统指定JDK版本的方法
- bash下面快捷键命令
- XSLT2.0 从外部读取信息并分析生成对应文件.采用xsl:for-each-group进行排序输出
- AOP( aspect-oriented programming)面向切面编程
- poj 1113 Wall