mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-01-12 22:46:30 +08:00
Separate index.css and App.css
This commit is contained in:
committed by
Christopher Chedeau
parent
d2130d2b3e
commit
4b4a8a155d
@@ -1,8 +1,8 @@
|
||||
body {
|
||||
background-color: #f5fcff;
|
||||
.App {
|
||||
padding: 0px 20px;
|
||||
}
|
||||
|
||||
.App--logo {
|
||||
.App-logo {
|
||||
animation: spin infinite 20s linear;
|
||||
border-radius: 50%;
|
||||
vertical-align: middle;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import React from 'react';
|
||||
import './App.css';
|
||||
import React from 'react';
|
||||
import logo from './logo.png';
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<div>
|
||||
<div className="App">
|
||||
<h1>
|
||||
Welcome to <img src={logo} className="App--logo" alt="logo" /> React
|
||||
Welcome to <img src={logo} className="App-logo" alt="logo" /> React
|
||||
</h1>
|
||||
<p>
|
||||
To get started, edit <code>src/App.js</code> and save to reload.
|
||||
|
||||
4
src/index.css
Normal file
4
src/index.css
Normal file
@@ -0,0 +1,4 @@
|
||||
body {
|
||||
background-color: #f5fcff;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
import './index.css';
|
||||
import React from 'react';
|
||||
import { render } from 'react-dom';
|
||||
import App from './App';
|
||||
|
||||
Reference in New Issue
Block a user