Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

react background image

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'
}}
Comment

set bg image in react

<div style={{ backgroundImage: "url(/assests/img/image.png)" }}>
  Hello World
</div>
Comment

set image as background react

<div  styles={{ backgroundImage:`url(${car})` }}>   
Comment

set image as background react

    <div  styles={{ backgroundImage:`url(${car})` }}>   
Comment

react background image

   style={{ backgroundImage:`url(${"https://picsum.photos/200/300"})` }}
Comment

set image as background react

<div  styles={{ backgroundImage:`url(${car})` }}>   
Comment

set image as background react

    <div  styles={{ backgroundImage:`url(${car})` }}>   
Comment

set image as background react

    <div  styles={{ backgroundImage:`url(${car})` }}>   
Comment

background image react

in your css 

.background {
  background-image: url('./Images/img.png')
}
Comment

background image react

react backgroundImage
Comment

PREVIOUS NEXT
Code Example
Javascript :: first day of month and last day of month moment js 
Javascript :: jquery disable option by value 
Javascript :: query select multiple classes 
Javascript :: javascript transpose array 
Javascript :: jquery remove element 
Javascript :: how to set/get cookie in JavaScript 
Javascript :: xmlhttprequest response 
Javascript :: javascript radio button onchange 
Javascript :: scrollheight jquery 
Javascript :: sql json_extract 
Javascript :: GET req with js 
Javascript :: jquery refresh image without refreshing page 
Javascript :: datatable cdn 
Javascript :: utc to local time javascript 
Javascript :: execute javascript when page finished loading 
Javascript :: text to 64base javascript 
Javascript :: splidejs pauseOnHover 
Javascript :: get random element from array js 
Javascript :: javascript seconds to date 
Javascript :: seconds to degrees 
Javascript :: how to detect onend reach of scrollview in react native 
Javascript :: javascript window.history.pushstate 
Javascript :: req.url 
Javascript :: lottie react 
Javascript :: serialization and deserialization in javascript 
Javascript :: swapping elements in an array 
Javascript :: how to set current date and time in jquery datetime-local 
Javascript :: define array with custom index javascript 
Javascript :: js make node with string 
Javascript :: javascript colorized console.log 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =