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

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;
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

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

PREVIOUS NEXT
Code Example
Javascript :: join-an-array-by-a-comma-and-a-space 
Javascript :: style react native alert text 
Javascript :: elasticsearch performance 
Javascript :: masterselect angular 8 
Javascript :: google auto complete not show on modal 
Javascript :: three js div over orbitcontrol 
Javascript :: song discord.js 
Javascript :: facebook graph X-Hub-Signature 
Javascript :: call a method of component from outside react 
Javascript :: How to apply CodeMirror in Bootstrap Modal 
Javascript :: nativescript build debug apk 
Javascript :: jequery mose up 
Javascript :: mongoose remove more than 1 item 
Javascript :: javascript get local timezone 
Javascript :: c# summary brackets 
Javascript :: react-chartjs-2 donut chart 
Javascript :: app scrip sheet cell boarder 
Javascript :: discord.js change role permissions 
Javascript :: javascript make the web browser scroll to the top 
Javascript :: instantiation javascript 
Javascript :: dom jquery 
Javascript :: rewrite /src/App.js 
Javascript :: Detectando url diferente em nodeJs 
Javascript :: html random 
Javascript :: set select2 value from local storage 
Javascript :: Getting the type of a control using Javascript 
Javascript :: how to display a title of document if a text is present in that document javascript 
Javascript :: listen to changes in children of div in html 
Javascript :: random number in range javascript 
Javascript :: reinitialise or reset all values in mapping in solidity 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =