Search
 
SCRIPT & CODE EXAMPLE
 

CSS

how to add background image in styled components

import styled from 'styled-components';
import img from './img/bg.gif';
    
const Content = styled.div`
  border: 1px solid #000;
  background-image: url(${img});
  width: 2000px;
  height: 2000px;
`;
Comment

background image with styled components


const Content = styled.div`
    background-image: url(${props => props.img});
`;
<Content img={ImagePath} />
Comment

PREVIOUS NEXT
Code Example
Css :: fira code cdn 
Css :: How to disable phone number linking in Mobile Safari 
Css :: advance logic in css 
Css :: css battle 54 char 
Css :: COMO ADC HOVER 
Css :: grid-templete-rows: masonary 
Css :: mount file share linux windows ubuntu 
Css :: crear un sol con css 
Css :: création forme geometrique 5 cote html css 
Css :: on frontend grivity form css not load 
Css :: How do you display a border like this: 
Css :: How to make background fixed while scrolling 
Css :: html click through image 
Css :: asp.net set css class in code behind 
Css :: locale_translation_projects_alter 
Typescript :: typescript code ignore 
Typescript :: benefits eat halim plant leaves 
Typescript :: loop through form controls angular 
Typescript :: passport serializeuser 
Typescript :: rename table of contents latex 
Typescript :: check ports in use docker 
Typescript :: eslint no-unused-vars typescript 
Typescript :: nodemon typescript 
Typescript :: adonis select 
Typescript :: vue typescript extend component option 
Typescript :: concat array to an array only unique values in angular 
Typescript :: ion2 calendar locale 
Typescript :: styled components conditional hover 
Typescript :: typescript check if string is base64 or not path to src 
Typescript :: divide all elements of list by an integer 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =