1import React from 'react';
2import car from './images/car.png'
3function App() {
4 return (
5 <div styles={{ backgroundImage:`url(${car})` }}> <h1>This is red car</h1>
6 </div>
7 );
8}
9
10export default App;
1style={{
2 backgroundImage: "url(" + "https://images.pexels.com/photos/34153/pexels-photo.jpg?auto=compress&cs=tinysrgb&h=350" + ")",
3 backgroundPosition: 'center',
4 backgroundSize: 'cover',
5 backgroundRepeat: 'no-repeat'
6}}