/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View
} from 'react-native';
export default class App extends Component<{}> {
render() {
return (
<View style={styles.container}>
<Text style={styles.title}>
整个的大的View
</Text>
</View>
);
}
}
const styles=StyleSheet.create({
container:{
//名字为 container的具体样式
backgroundColor:'#eae7ff',
flex:1,
paddingTop:120
},
title:{
fontSize:21,
color:'#6435c9',
textAlign:'center',//文字居中显示
fontStyle:'italic',//字体是斜体
letterSpacing:2, //字间距
lineHeight:33,//行间距
fontFamily:'Courier',//字体
fontWeight:'100',//文字的粗细 bold 加粗 也可以设置成具体的字号大小(100,300,600,900是最粗的文字)
textDecorationLine:'line-through',//underline 文字的下划线 line-through 中间横穿的线
textDecorationStyle:'dashed' //double 双实线 solid 实线 dotted 点线 dashed 虚线
}
})
RN中文字的样式
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。
推荐阅读更多精彩内容
- 成长记录-连载(三十六) ——我的第一篇五千字长文,说了什么,你一定想不到 并不是不想每天写公众号,而是之前思考怎...
- 上一章讲到BaseViewModel中几个状态,而通常这几个状态都是根据网络返回情况来判断的,建立一个基类写一个通...