PureCss Responsive Images

2019-06-14 11:06发布

问题:

I am just trying to do my first page using purecss, what I am stuck at the moment is in using pure-img for having responsive images, the image are responsive when I reduce the screen but when the screen become bigger and the image are supposed to increase from their original dimension they just stay static in their original size.

Can you please help me :)

回答1:

Try:

img {
  max-width: 100%;
  height: auto;
}


回答2:

The simplest way - just append width: 100% on your image.

https://jsfiddle.net/zv95xt4r/