gpt4 book ai didi

html - BootStrap 移动导航格式问题

转载 作者:太空宇宙 更新时间:2023-11-04 13:37:05 24 4
gpt4 key购买 nike

我在超链接旁边有文本,需要在页脚中位于同一行。当响应没有进入移动模式时,它可以完美地工作。

我在 navbar-header 中拥有所有代码,inline-block 在移动设备之前工作正常。

我做错了什么?

页脚 HTML:

<div class="navbar navbar-inverse navbar-fixed-bottom">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class='navbar-text' style='margin-left: 15px;'>Test - 426482 - Demo</div> <ul class='nav navbar-nav'><li style='display: inline-block;'><a href='console.php' target='_blank'>Console</a></li></ul>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
<ul class='nav navbar-nav'>
</ul>
<ul class="nav navbar-nav navbar-right">
<div class='form-group'>
<form action='logout.php' method='post' class='navbar-form ajaxform'>
<input type='text' name='fullUrl' hidden='true' id='fullUrl' value="">
<input type="submit" style="clear: left; width: 100%;" class='btn btn-primary' name="commit" value="Logout" />
</form>
</div>
</ul>
</div>
</div>
</div>

普通版页脚(格式正确): enter image description here

Footer Mobile Version(需要同一行): enter image description here

最佳答案

忘了我上面说的吧。如果您在“测试 - 426482 - 演示”和“控制台”上使用 navbar-brand 类,则可以更轻松地实现您想要的效果。看看我做的demo here .

编辑:更新链接 here

<div class="navbar navbar-inverse navbar-fixed-bottom">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-2">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-text" style="float: left;">Test - 426482 - Demo</span>
<a class="navbar-text" style="float: left; margin-left: 15px;" href="console.php" target="_blank">Console</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-2">
<ul class='nav navbar-nav'>
</ul>
<ul class="nav navbar-nav navbar-right">
<div class='form-group'>
<form action='logout.php' method='post' class='navbar-form ajaxform'>
<input type='text' name='fullUrl' hidden='true' id='fullUrl' value="">
<input type="submit" style="clear: left; width: 100%;" class='btn btn-primary' name="commit" value="Logout" />
</form>
</div>
</ul>
</div>
</div>
</div>

关于html - BootStrap 移动导航格式问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22969766/

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