In general, there are several questions, but in one direction. For example, we have a block in which there is an image in the background .
.img-cont { position: absolute; left: 20%; top: 20%; right: 20%; bottom: 20%; background: url(http://agstudio.pro/project/barba/02.jpeg) center / cover; } <div class="img-cont"></div> We have different permissions, from phones, to 4K screens. In such situations, we go in the wake of the search engines and in all possible ways we try to trim the size and quality of images. About compression is not talking now. Only about permissions.
So how best to write dimension in this case? For .img-cont set the minimum image, and then increase the dimension for different ranges from small through media queries?
@media screen and (min-width: 600px) and (min-height: 500px) { .img-cont {background-image: url(.../02small.jpeg)} } @media screen and (min-width: 800px) and (min-height: 600px) { .img-cont {background-image: url(.../02middle.jpeg)} } @media screen and (min-width: 1200px) and (min-height: 700px) { .img-cont {background-image: url(.../02big.jpeg)} } Or set the average resolution? Or is there no difference?
Second moment. Does it even make sense to bother? Or will it be enough to set the minimum size as a standard, and with a single media request, put a large resolution for all but the phones?
Are all of these images loaded from the stylesheet at boot? Or only when sending a request? That is, it is better to put 1-2 options of dimension or more?
If there are more tips on working with images at different screen resolutions, I will be grateful.