React-Native基础_2.样式Style
来源:互联网 发布:java web start 编辑:程序博客网 时间:2024/05/09 15:49
2.样式Style基本使用方式1 直接在View 上面写style 内容 <View style={{ backgroundColor: '#07811d', flex: 1 }}> <Text> Welcome to React Native! </Text> </View>方式2 StyleSheet.create定义一个style 常量,然后直接使用常量中定义好的属性export default class Day0718 extends Component { render() { return ( <View style={styles.Container}> <Text style={styles.Text}> Welcome to React Native! </Text> </View> ); }}const styles = StyleSheet.create({ Container :{ borderWidth :1, borderColor:'#c9382d', borderRadius:15, shadowColor:'#6435c9', shadowOpacity:0.6, shadowRadius:2, shadowOffset:{ height:1, width:0, }, margin:10, backgroundColor: '#c9382d', flex: 1, }, Text:{ color:'#6435c9', fontSize: 26, textAlign:'center', fontStyle:'italic', letterSpacing:2, lineHeight:33, fontFamily:'Helvetica Neue', fontWeight:'300', textDecorationLine:'underline', textDecorationStyle:'dashed', },});
---------------欢迎各位大神加群
----------------Android交流群:230274309
-----------------------------期待大神们的到来
------------------------一---起分享,一起进步!需要你们
阅读全文
0 0
- React-Native基础_2.样式Style
- React-Native 基础(四)使用style定义组件的样式
- React Native 学习笔记(五)-- 样式Style
- React Native View Style
- React Native 之 Style
- React Native 指定 style
- react-native 之style
- React Native 三:样式
- React Native之样式
- React Native之样式
- React-native之样式
- React Native之样式
- react native样式设计
- React-Native 样式指南
- React Native style属性重载
- 【React Native】React Native元素样式设置
- 混合开发的大趋势之一React Native State (状态),Style(样式)
- android 基础 style样式
- Codeforces Round #425 (Div. 2) B. Petya and Exam
- React-Native基础_1.初识React-Native项目
- 约瑟夫环问题,写代码之前重在理解
- 认知神经心理学(各种生理心理效应)
- 大数据可视化常用图表--简单说
- React-Native基础_2.样式Style
- HTTP1.0和HTTP1.1的区别
- java中的map集合(独特的遍历方式)
- 过滤器filter
- Notepad++配置运行python程序
- caffe模型优化流程解析
- 155. Min Stack
- Cannot forward after response has beencommitted问题分析及解决
- React-Native基础_3.Flex布局