我用 Bootstrap 4 药丸创建了一个布局。第一次点击时工作正常,第二次点击时就不起作用。假设如果我们依次单击 menu1、menu2、menu3 - 选项卡内容正在加载,而如果我再次单击 menu1 - 选项卡内容没有更改。我犯了一些错误,但我对实现这个场景有点困惑。我想要如下所示的设计。
谁能纠正我的错误,这对我有很大帮助。预先感谢,下面是我的片段,请在完整窗口中查看我的结果以检查我的布局设计
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<div class="container-fluid">
<div class="row">
<div class="col-md-12 mb-4">
<div class="">
<div class="nav nav-pills row">
<div class="nav-item col-md-1">
<a class="nav-lin active btn btn-outline-secondary btn-lg" data-toggle="pill" href="#menu1">Menu 1</a>
</div>
<div class="nav-item col-md-1">
<a class="nav-lin btn btn-outline-secondary btn-lg" data-toggle="pill" href="#menu2">Menu 2</a>
</div>
<div class="nav-item col-md-1">
<a class="nav-lin btn btn-outline-secondary btn-lg" data-toggle="pill" href="#menu3">Menu 3</a>
</div>
<div class="nav-item col-md-1">
<a class="nav-lin btn btn-outline-secondary btn-lg" data-toggle="pill" href="#menu4">Menu4 4</a>
</div>
<div class="nav-item col-md-1">
<a class="nav-lin btn btn-outline-secondary btn-lg" data-toggle="pill" href="#menu5">Menu 5</a>
</div>
<div class="nav-item col-md-1">
<a class="nav-lin btn btn-outline-secondary btn-lg" data-toggle="pill" href="#menu6">Menu 6</a>
</div>
</div>
</div>
</div>
</div>
</div>
有只小跳蛙
相关分类