react-firebase-starter icon indicating copy to clipboard operation
react-firebase-starter copied to clipboard

How to use background-image from style.css

Open letthefireflieslive opened this issue 8 years ago • 0 comments

I placed my image in public/bg.jpg. I want to make this a background image to my src/home/style.css.

src/home/style.css

body {
  background-image: url('swing.jpg');
}

src/home/index.js

import React, { PropTypes } from 'react';
import Layout from '../../components/Layout';
import s from './styles.css';

class HomePage extends React.Component {
  render() {
    return (
      <Layout className={s.content}>
      </Layout>
    );
  }

}

export default HomePage;

letthefireflieslive avatar May 07 '17 15:05 letthefireflieslive