I don’t want load the image on a mobil device, only on desktop.
I write the follow code:
CSS
@media only screen and (max-width: 480px) {
div#line1 {display: none}
}
HTML
<div id="line1" style=" background-image:url(/background.jpg);">
<img src="/head.jpg" />
</div>
The image background.jpg is not loaded, but the image head.jpg
If i add
div#line1 img {display: none} // for < 480 px
the same. The Image head.jpg is loading on a small resolution screen.
How can I prevent load the head.jpg to save bandwidth?
PS: i tested on Chrome browser