Setting Up the Initial CSS

現在來試試寫個簡單的 CSS,看看效果:

建立 app/main.css

body {
  background: cornsilk;
}

然後要在 index.js 裡面引用(require)CSS:

require('./main.css');

...

執行 npm start,打開 localhost:8080,然後試著變更 CSS(比如說把背景顏色換成 background: lime),看網頁內容有沒有跟著變更。

results matching ""

    No results matching ""