Auto image resize based on browser window dimensions

后端 未结 4 1136
天涯浪人
天涯浪人 2020-12-14 04:52

I have a basic web page layout with a 100% width header and a sticky footer. In between the two I have a large graphic.

I would like the graphic to resize dynamicall

4条回答
  •  心在旅途
    2020-12-14 05:14

    Set the image containers width in percent as in width:{amount}%;, then set the image's width in percent also. This way your image container expands as your image expands also, or at least it will seem like so, because the image is actually expanding as the container expands. You dont necessarily need to set the image width to 100%, but whatever with you set is relative the containers width.

提交回复
热议问题