react(16.13.1)項目創建(二)(antd,react-router-dom,styled-components)

1.安裝 antd

npm install antd --save

2.在App.js中 引入

import 'antd/dist/antd.css';

3.安裝 react-router-dom

npm install react-router-dom

4.安裝styled-components

npm install styled-components
styled-components 使用方法  新建style.js    

import styled from "styled-components";
export const FootStyle =styled.div`
  &.textStyle{
    color: red;
  }
`

styled-components 如何在組建中使用

import React from "react";
import { FootStyle } from "./style"
const Foot = () => {
    return (
        <FootStyle className='textStyle'>
            <div >底部</div>
        </FootStyle>
    )
};
export default Foot;

**

react(16.13.1)項目創建(三)(頁面佈局,路由封裝,css模塊)

**

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章