I am planning to redesign my site using the Flexible Box Layout Module to make it responsive since it seems to be the winning layout method for responsive sites.

But what happens if an image in one of the boxes are wider than the viewport? Can I automatically scale down the size of the image if the image is too wide for the viewport?

I haven't been able to find solid info on this topic. This may be a basic or bad question, I am not sure.

有帮助吗?

解决方案

Yes, as following:

img {
max-width: 100%;
height: auto;
width: auto\9; /* ie8 */
}

(although I'm not sure if necessary, since mobile devices scale down images themselves)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top