react background image

Solutions on MaxInterview for react background image by the best coders in the world

showing results for - "react background image"
Julian
10 Mar 2019
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;
Yael
19 Oct 2019
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}}
Caitlyn
23 Feb 2020
1style={{backgroundImage: `url(${pencil})`}}
Isabel
19 Aug 2020
1in your css 
2
3.background {
4  background-image: url('./Images/img.png')
5}
Riccardo
10 Oct 2019
1<div  styles={{ backgroundImage:`url(${car})` }}>   
Elsa
14 Sep 2018
1    <div  styles={{ backgroundImage:`url(${car})` }}>   
similar questions
queries leading to this page
react background image