我在超链接旁边有文本,需要在页脚的同一行上。当响应式广告无法进入移动模式时,它可以完美工作。

我在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>


页脚普通版(格式正确):


页脚移动版(需要同一行):

最佳答案

忘了我上面提到的。如果在“测试-426482-演示”和“控制台”上使用navbar-brand类,则可以轻松实现所需的目标。看看我制作的演示。

编辑:更新链接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>

07-24 09:47
查看更多