Scrolling div without fixed height

前端 未结 3 886
故里飘歌
故里飘歌 2021-02-01 03:44

I need to build a dynamically-resizing scrolling div.

The div should dynamically resize to fit the screen. But if the content doesn\'t fit on the screen, it should disp

3条回答
  •  不知归路
    2021-02-01 04:37

    If you are trying to make element fit the screen then you can set the value of hight and width of the element to 100%.

    You will also need to set the height of html and body

    html, body {height: 100%}
    #gridcontaine {
       height: 100%;
       width: 100%;
     }
    

提交回复
热议问题