Answers for "react app background image"

CSS
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
0

set image as background react

<div  styles={{ backgroundImage:`url(${car})` }}>
Posted by: Guest on October-01-2021

Code answers related to "react app background image"

Browse Popular Code Answers by Language