最佳答案
首先,添加:
margin:0;
在您的 html, body{
CSS 样式中。
例如:
html, body{
margin:0;
/*more code*/
}
此外,您已将 menubar-left
设置为 height:100%
。
menubar-top
是 50px
高。
这意味着加起来是 100% + 50px
。
您可以将 menubar-left
的高度设置为 height: calc(100% - 50px);
或更改 menubar-top
到 %
然后将其从 100
中移开,这将是您新的 menubar-left
高度。
你的代码应该是这样的:
menubar-left{
height:calc(100% - 50px);
/*more styles*/
}
menubar-top{
height:5%;
/*more styles*/
}
menubar-left{
height:95%;
/*more styles*/
}
关于CSS height + 为什么这个plunker上有滚动条?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24014260/