Bootstrap 5 下拉菜单无法切换回来自定义管理仪表板&...</desc> <question vote="1"> <pre><code><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Custom Admin Dashboard</title> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <script src="bootstrap/js/bootstrap.min.js"></script> </head> <body> <div class="dropdown dropdown-center"> <button class="btn btn-outline dropdown-toggle rounded-3" type="button" data-bs-toggle="dropdown" aria-expanded="false"> Order Status </button> <ul class="dropdown-menu"> <li><a class="dropdown-item active" href="#">In Stock</a></li> <li><a class="dropdown-item" href="#">Cancelled</a></li> <li><a class="dropdown-item" href="#">Delivered</a></li> <li><a class="dropdown-item" href="#">Progress</a></li> </ul> </div> <script src="https://unpkg.com/@popperjs/core@2"></script> <script src="bootstrap/js/bootstrap.min.js"></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script> </body> </code></pre> <p>我的 Bootstrap 5 下拉列表没有折叠回来,我尝试了很多但找不到解决方案</p> </question> <answer tick="false" vote="0"> <p>您加载 Bootstrap 脚本两次,这导致了冲突。</p> <p>删除一个脚本标签:</p> <pre><code><head> <!-- remove this --> <!--<script src="bootstrap/js/bootstrap.min.js"></script>--> </head> <body> <script src="bootstrap/js/bootstrap.min.js"></script> </body> </code></pre> </answer> </body></html>

问题描述 投票:0回答:0
drop-down-menu bootstrap-5
© www.soinside.com 2019 - 2024. All rights reserved.