📜  使用媒体查询的响应式图像 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:48.847000             🧑  作者: Mango

代码示例3
.img {
  background-image: url(examples/images/image-384.jpg);
  background-image: 
    -webkit-image-set(
      url(examples/images/image-384.jpg) 1x,
      url(examples/images/image-768.jpg) 2x,
    );
  background-image: 
    image-set(
      url(examples/images/image-384.jpg) 1x,
      url(examples/images/image-768.jpg) 2x,
    );
}