Answers for "background image react"

CSS
9

backgroundImage react

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

Browse Popular Code Answers by Language