Définition d'une image d'arrière-plan avec des styles en ligne React
backgroundImage: `url(${Background})`
Batman
backgroundImage: `url(${Background})`
style={{
backgroundImage: "url(" + "https://images.pexels.com/photos/34153/pexels-photo.jpg?auto=compress&cs=tinysrgb&h=350" + ")",
backgroundPosition: 'center',
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat'
}}
<div styles={{ backgroundImage:`url(${car})` }}>
style={{backgroundImage: `url(${pencil})`}}
in your css
.background {
background-image: url('./Images/img.png')
}
react backgroundImage