小编Ale*_*kup的帖子

无法更改字体系列(React-Native)

我对本机反应很陌生,对 CSS 没有太多经验。我只是想将字体系列更改为 helvetica。我试了很多次都没有改变

这是我的 css 代码:

import {StyleSheet} from "react-native";

export default StyleSheet.create({

  header: {
    backgroundColor:'#004D4D',
    height: 35,
  },

  headerT: {
    color: '#FFFFFF',
    fontSize: 20,
    fontFamily: 'Helvetica',
    textAlign: 'center',
    justifyContent: 'center',
  },

  body: {
    backgroundColor:'#E6FFFF',
    flex:1,
  },

})
Run Code Online (Sandbox Code Playgroud)

这是我要修改的页面

import React, { Component } from 'react';
import { Text, View, Button } from 'react-native';
import styles from "../style/css";

class HomeScreen extends Component{
  render(){
    return(
      <View style={styles.body}>


        <View style={styles.header}>
          <Text style={styles.headerT}>Home Screen</Text>
        </View>


      </View>

    );
  }
}

export default HomeScreen; …
Run Code Online (Sandbox Code Playgroud)

css react-native

5
推荐指数
1
解决办法
3215
查看次数

标签 统计

css ×1

react-native ×1