質問

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