Responsive design: different images for different screen sizes

后端 未结 2 2154
南方客
南方客 2020-12-31 10:44

Our client wants to have a different banner image on smaller screens than on larger screens. Not just shrink/stretch to fit, but actually substitute a different image. The f

2条回答
  •  佛祖请我去吃肉
    2020-12-31 10:51

    you may use css background in media queries. The images are only loaded if the CSS requires it to be, so if nothing matches the selector then it won't bother loading the image.

    This article will surely help you.

提交回复
热议问题