Установка фонового изображения с помощью встроенных стилей 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