html – max-width 100% for img on a gummy site. Fractional pixels

Question:

How can you solve the problem with images that have max-width: 100% on a rubber site?

Almost always, their width and height values ​​are obtained with fractional values ​​(for example: 234.34 pixels), which 234.34 them cloudy.

Answer:

It's not about fractional pixels, even if you make them whole, the image will still be hazy due to the low pixel density when scaling it.

Increase the pixel density in the image by at least 1.5x – 2x the resolution the browser displays on the screen. That is, if you have a baseline size for a 200×200 standard pixel density screen, then you need a 400×400 image to maintain sharpness on high pixel density retina screens.

Scroll to Top