-1
我做了进展throught网站吧,我有一个问题。有表示了FrontPage的部分,当你点击其中一个就滚动到部分位置的4个span元素。问题是,由于某种原因,span元素比格cointaining它高,而对于这一点,我不能垂直对齐。直到你尝试在较小的分辨率下使用网站时,这是不成问题的,span元素会溢出div。为什么这个跨度有更大的高度比它的父
Here是我在说什么
见,正确的属性是因为,根据区间位置定位跨度脚本。
而且here是哪里出了问题变得明显
下面是HTML:
<header id="masthead" class="site-header" role="banner" style="position: relative; top: auto;">
<div class="container-fluid">
<div class="row">
<div id="progressDiv">
<span id="progBar">
</span>
<div id="SectionsPos">
<a href="/#features">
<span id="novedPos" class="sectPos"> Novedades </span>
</a>
<a href="/#about">
<span id="redesPos" class="sectPos tooBig"> Redes Sociales </span>
</a>
<a href="#ProductosPrinc">
<span id="prodPos" class="sectPos"> Productos </span>
<a href="#Contacto">
<span id="contPos" class="sectPos"> Contacto </span>
</a>
</div>
</div>
</div>
</div>
这里是CSS:
#progressDiv {
display: block;
border: solid 1px;
border-color: #d9b25f;
position: relative;
width: 100%;
height: 10vh;
}
#progBar {
height: inherit;
display: block;
width: 0%;
background: #d9b25f;
max-width: 100%;
}
#SectionsPos{
display: block;
position: absolute;
width: 100%;
top: 50%;
height: 10vh;
margin-top: -5vh;
}
.sectPos {
font-weight: 900;
color: white!important;
position: absolute;
}
原谅我的英语,它不是我的母语,如果有什么不完全的东西明确的,请让我知道,我会尽力解释自己更好
请张贴所有的菜单代码这里 –
我了解的是你想要的菜单响应,也看起来像您正在使用引导了点。但是你在这里没有很好地使用bootstrap。让我知道我的理解是否正确。 – Prasoon
尝试最小高度设定为父系格,这样跨度绝不会更高。不幸的是,除非您发布您的代码,否则我们无法提供帮助 – derloopkat