下拉菜单bootstrap3切移动

时间:2016-05-31 13:39:12

标签: css twitter-bootstrap css3 twitter-bootstrap-3

我的bootstrap3中有下拉菜单的问题。当我放置移动版本时,他最终打破布局,从而生成水平滚动条。有谁知道如何解决这个问题?图片和链接如下。 Imagem Here



<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>TeleMonitoramento 2</title>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

<body style="padding-top: 50px">
  <nav class="navbar navbar-default navbar-fixed-top">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="#">TeleMonitoramento 2</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li class="active"><a href="#">Gerais <span class="sr-only">(current)</span></a></li>
        <li><a href="#">Pacientes</a></li>
      </ul>
      <form class="navbar-form navbar-right" role="search">
        <div class="form-group">
          <input type="text" class="form-control" placeholder="Procurar">
        </div>
        <button type="submit" class="btn btn-default">Procurar</button>
      </form>
    </div>
    <!-- /.navbar-collapse -->
  </nav>
  <div class="container-fluid">
    <div class="row">
      <div class="col-xs-12 col-sm-3 col-md-3">
        <h1 class="page-header">Menu</h1>
        <ul class="nav nav-pills nav-stacked">
          <li role="presentation" class="active"><a href="#">Dashboard</a></li>
          <li role="presentation"><a href="#">Atenção PAD <span class="badge text-right">4</span></a></li>
        </ul>
      </div>
      <div class="col-xs-12 col-sm-9 col-md-9">
        <h1 class="page-header">Dashboard</h1>

        <div class="col-xs-12 col-sm-6 col-md-6">
          <div class="panel panel-primary">
            <!-- Default panel contents -->
            <div class="panel-heading">Últimas ligações</div>
            <div class="panel-body">
              <div class="form-group col-sm-12 col-md-12">
                <input type="text" class="form-control" placeholder="Procurar" />
              </div>
              <div class="col-xs-12 col-md-12 col-sm-12">
                <table class="table table-striped">
                  <thead>
                    <tr>
                      <th>Data</th>
                      <th>Nome</th>
                      <th>Destino</th>
                    </tr>
                  </thead>
                  <tbody>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                    <tr>
                      <td>06/06/2016 23:00</td>
                      <td>Daniel Bastos</td>
                      <td>Camila Penido</td>
                    </tr>
                  </tbody>
                </table>
              </div>
              <nav>
                <ul class="pager">
                  <li class="previous"><a href="#"><span aria-hidden="true">&larr;</span> Voltar</a></li>
                  <li class="next"><a href="#">Próximo <span aria-hidden="true">&rarr;</span></a></li>
                </ul>
              </nav>
            </div>
          </div>
        </div>

        <div class="col-xs-12 col-sm-6 col-md-6">
          <div class="panel panel-primary">
            <!-- Default panel contents -->
            <div class="panel-heading">Ligações não realizadas</div>
            <div class="panel-body">
              <table class="table table-striped">
                <thead>
                  <tr>
                    <th>Nome</th>
                    <th>Destino</th>
                    <th>Ações</th>
                  </tr>
                </thead>
                <tbody>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <!-- Extra small button group -->
                      <div class="btn-group">
                        <button class="btn btn-primary btn-xs dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                          Opções <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                          <li class="dropdown-header">Escolha novo dia</li>
                          <li role="separator" class="divider"></li>
                           <li><a href="#">Amanhã</a></li>
                            <li><a href="#">Outro dia</a></li>
                            <li><a href="#">Transferência</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="#">Remover</a></li>
                        </ul>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                  <tr>
                    <td>Daniel Bastos</td>
                    <td>Camila Penido</td>
                    <td>
                      <div class="btn-group btn-group-xs" role="group" aria-label="...">
                        <button type="button" class="btn btn-success">Amanhã</button>
                        <button type="button" class="btn btn-primary">Outro dia</button>
                      </div>
                    </td>
                  </tr>
                </tbody>
              </table>
              <div class="col-xs-12 col-sm-12 col-md-12 text-center">
                <button type="button" class="btn btn-success btn-sm">
                  <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Visualizar mais
                </button>
              </div>
            </div>
          </div>
        </div>

      </div>
    </div>
  </div>

</body>

</html>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

尝试在ul

中添加dropdown-menu-right
<ul class="dropdown-menu dropdown-menu-right">