PureCss Responsive Images

时光毁灭记忆、已成空白 提交于 2019-12-23 04:43:42

问题


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/



来源:https://stackoverflow.com/questions/41214511/purecss-responsive-images

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!