Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react app css add background image

import React from 'react';
import car from './images/car.png'
function App() {
  return (
  
  {*style not styles*}
  
    <div  style={{ backgroundImage:`url(${car})` }}>      <h1>This is red car</h1>
    </div>
  );
}

export default App;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #app #css #add #background #image
ADD COMMENT
Topic
Name
6+6 =