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

前端 未结 11 1020
太阳男子
太阳男子 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:31

    Use height: auto together with width: auto and it is going to work in IE. If you specify only one of them, IE gets upset.

    height: auto;
    width: auto;
    

提交回复
热议问题