I want bootstrap 4.1 navbar links to be vertically aligned to bottom of the navbar. The links are currently aligned centered vertically. I have given height of 150px to navbar and given padding of 100px to the navbar-nav and I am able to get them at the bottom but its look distorts when the navbar collapses. Here is the fiddle :
https://jsfiddle.net/ctk60df7/1/
Please help me
您将需要使用媒体查询,以便仅在导航栏折叠为“移动”垂直模式之前应用 150 像素高度。对于navbar-expand-lg
,导航栏在 992px 处折叠,因此媒体查询将是:
@media (min-width:992px) {
.navbar {
height: 150px;
}
}
然后用于align-items-end
对齐底部的导航链接。
<nav class="navbar navbar-expand-lg navbar-dark bg-dark align-items-end">
<div class="container">
</div>
</nav>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句