IE doesn't support height=auto for images, what should I use?

前端 未结 11 930
太阳男子
太阳男子 2021-01-03 22:51

I have some images with height=auto because sometimes they are different heights whereas they are always the same width. It works in every browser but I.E., is there someth

11条回答
  •  迷失自我
    2021-01-03 23:55

    For Edge browser you can use max-height, which will also work for other browsers

    max-height: 100%;
    

提交回复
热议问题