Answers for "how to place background image in html in react"

9

how to add background image in react css

import React from 'react';
import car from './images/car.png'
function App() {
  return (
    <div  styles={{ backgroundImage:`url(${car})` }}>      <h1>This is red car</h1>
    </div>
  );
}

export default App;
Posted by: Guest on July-23-2020
1

how to import background image in inline css in react

style={{backgroundImage: `url(${pencil})`}}
Posted by: Guest on April-30-2020

Code answers related to "how to place background image in html in react"

Code answers related to "Javascript"

Browse Popular Code Answers by Language