Responsive design: different images for different screen sizes

后端 未结 2 1984
南方客
南方客 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.

    0 讨论(0)
  • 2020-12-31 11:17

    I would checkout Zurb Foundation's Interchange for handling responsive images. The best cross browser approach i have found.

    http://foundation.zurb.com/docs/components/interchange.html

    0 讨论(0)
提交回复
热议问题