[英]3 elements on page, 100vh altogether, one height unknown
The picture shows what I want to achieve. 图片显示了我想要实现的目标。 I don't want to declare the height for the navbar, it might be flexible depending on the device.
我不想声明导航栏的高度,它可能灵活,具体取决于设备。
The "code" in my opinion would have to be smth like: 我认为“代码”必须像这样:
"100vh - navbar = available space", make an "available space" div and use the percentage in the typical way. “ 100vh-navbar =可用空间”,将“可用空间” div并以典型方式使用百分比。
No idea though how to execute it, anybody pls? 没人知道如何执行它吗?
for the navbar I would recommend you to use bootstrap navbar 对于导航栏,我建议您使用引导导航栏
- navbar fixed top , good for your case I would say -导航栏固定顶部 ,对您的情况好
then you can simply do so 那么你可以简单地这样做
<div id="logo" style="width:100%;height:40%"></div>
<div id="imageslider" style="width:100%;height:60%"></div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.