Changing image sizes proportionally using CSS?

后端 未结 9 2150
面向向阳花
面向向阳花 2020-12-12 10:19

I have been trying for a couple of days now to configure my thumbnail gallery so all the images appear the same height and width. However when I change the Css code to,

9条回答
  •  爱一瞬间的悲伤
    2020-12-12 10:28

    To make images adjustable/flexible you could use this:

    /* fit images to container */
    .container img {
        max-width: 100%;
        height: auto;
    }
    

提交回复
热议问题