我制作的网站nav使用的是固定位置的风格。主要内容物高度尺寸为钙(100vh- nav_size)。我单击main content中的标签move context so,main content向上移动了65个像素。我不明白为什么溢出了65像素。我认为“col6”高度扩展了父母的高度(主要内容)。
我尝试了插入选项(位置:静态、移除相对或事物)。但没有解决这个问题。
<div class="wrapper">
<div class="nav" style="position:fixed; height:65px">
some code...
</div>
<div class="wrapper" style="padding-top:65px;">
<div class="wrapper-2" style="postion:absolute; top:65px">
<div class="wrapper col-12" style="height:calc(100vh - 65px)">
<div class="col-6" style="height:100%">
some code...
</div>
<div class="col-6" style="height:100%">
Contexts...
<a herf="#context-1"/>
...
Context-1
</div>
<div>
</div>
</div>
</div>这段代码就是一个例子。这个结果是如果你点击一个标签,你的焦点移动上下文-1。然后溢出65像素的“导航”。
发布于 2019-06-19 13:03:18
<div class="wrapper col-12" style="height:calc(100vh - 65px)">
// if you use bootstrap "col-12" change "row" classes try again请回信
https://stackoverflow.com/questions/56660230
复制相似问题