fill remaining vertical space
This question already has an answer here:
You will see in the css that I used calc() in the height
value to do a subtraction.
First get the viewport height of the device screen size by using 100vh
then subtract the height that is used above the div that you want to fill to take up the rest of the screen.
Here is the Fiddle .
Does this help?
PS: I commented in your nav code where you have a extra div
and where I added a </li>
.
.block {
height: -webkit-calc(100vh - 72px);
height: -moz-calc(100vh - 72px);
height: calc(100vh - 72px);
background-color: rgba(90,90,190,0.8);
}
链接地址: http://www.djcxy.com/p/88228.html
上一篇: CSS Div填充剩余高度
下一篇: 填充剩余的垂直空间