When does it make sense to use max-height
or max-width
on an image?
Does it help if I don't specify the actual dimensions of the image because I don't know it.
It makes sense when you have images of unknown width (for example, user uploaded content) that you do not want to exceed a certain area.
If I remember correctly, the property is not supported by IE6. It is however by IE7: Source
保留包含横向和纵向格式的图像列表的大小也是一个好习惯
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.