Separate index.css and App.css

This commit is contained in:
Dan Abramov
2016-07-17 13:04:44 +01:00
committed by Christopher Chedeau
parent d2130d2b3e
commit 4b4a8a155d
4 changed files with 11 additions and 6 deletions

View File

@@ -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;

View File

@@ -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
View File

@@ -0,0 +1,4 @@
body {
background-color: #f5fcff;
font-family: sans-serif;
}

View File

@@ -1,3 +1,4 @@
import './index.css';
import React from 'react';
import { render } from 'react-dom';
import App from './App';