问题:
I have a layout with two columns - a left div
and a right div
. 我有两列的布局-左div
和右div
。
The right div
has a grey background-color
, and I need it to expand vertically depending on the height of the user's browser window. 右边的div
具有灰色background-color
,我需要根据用户浏览器窗口的高度将其垂直扩展。 Right now the background-color
ends at the last piece of content in that div
. 现在, background-color
在该div
中的最后一条内容处结束。
I've tried height:100%
, min-height:100%;
我已经尝试过height:100%
, min-height:100%;
, etc. 等
解决方案:
参考一: https://stackoom.com/question/6blV/如何使div的浏览器窗口高度为参考二: https://oldbug.net/q/6blV/How-to-make-a-div-100-height-of-the-browser-window
来源:oschina
链接:https://my.oschina.net/stackoom/blog/3213586