Does “display:none” prevent an image from loading?

前端 未结 17 1910
再見小時候
再見小時候 2020-11-22 05:13

Every responsive website development tutorial recommends using the display:none CSS property to hide content from loading on mobile browsers so the website load

17条回答
  •  鱼传尺愫
    2020-11-22 05:53

    If you make the image a background-image of a div in CSS, when that div is set to "display: none", the image will not load. When CSS is disabled, it still will not load, because, well, CSS is disabled.

提交回复
热议问题