gpt4 book ai didi

html - 图像 Bootstrap 导航栏旁边的居中文本

转载 作者:行者123 更新时间:2023-11-28 03:07:15 24 4
gpt4 key购买 nike

我在导航栏中有一个 Logo ,旁边有文本。我想将文本垂直居中,使其位于 Logo 的中间。当我尝试调整 a.navbar-brand 时,一切都会移动。我是否需要用单独的 spandiv 标记包围 @Html.ActionLink 代码,然后在 css 中引用它?

enter image description here

        <div class="navbar-header">
<a class="navbar-brand">
<img alt="tribal_logo" src="~/Content/Images/tribal_logo2.gif" />
</a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
@Html.ActionLink("Fishing and Hunting License Program", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
</div>

最佳答案

尝试给 actionlink .btn-link 类,如果有更多的高度,然后调整导航栏的高度。

关于html - 图像 Bootstrap 导航栏旁边的居中文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45888460/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com