📜  带有样式组件的背景图像 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:58.708000             🧑  作者: Mango

代码示例2
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;
`;