📜  图像背景全宽反应 - Javascript 代码示例

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

代码示例1
import TechnicalImage from "E:\\env\\api-blog\\src\\images\\technical.jpg"
const divStyle = {
  width: '88%',
  height: '800px',
  backgroundImage: `url(${TechnicalImage})`,
  backgroundSize: 'cover'   <---- This is important
};