这个导航栏包含的下拉菜单在从Bootstrap v5.2.2转换到v5.2.3时不起作用。它不是下拉菜单,而是保持不变。有人能解释一下我做错了什么吗?
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<div id="page">
<header>
<nav class="navbar navbar-expand-sm bg-dark navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="/">AT Products LLC</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#collapsibleNavbar" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="/">AT Products</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">Products</a>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="/paid">Paid Services</a></li>
<li><a class="dropdown-item" href="/flash">Flash Documentation</a></li>
<li><a class="dropdown-item" href="/sms">SMS Bomb</a></li>
<li><a class="dropdown-item" href="/mdickie">MDickie Projects</a></li>
<li><a class="dropdown-item" href="/bxpp">BxPP</a></li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
</header>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
2条答案
按热度按时间nwlqm0z11#
您没有更改捆绑的javascript:
nbysray52#
我觉得你只是简单地更新了CDN代码的版本。这是行不通的。完整性密钥必须与实际文件匹配。你可以在浏览器控制台中看到错误:
无法在资源的'integrity'属性中找到有效摘要
确保从CDN复制新代码。