For example, to create an adaptive image, use the method below.
- Img is a line element, how can the height property be applied to it?
- If it is valid, and auto is the default value, then what is it for?
.container { width: 800px; max-width: 90%; } img { max-width: 100%; height: auto; }
background-sizewith the samecoverorcontain. And there will be no hassle. with width and height. - And