Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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;
`;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #background #image #styled #components
ADD COMMENT
Topic
Name
8+9 =