我正在关注引导程序教程。引导样式未在我的浏览器中应用。另外,所有必需的文件都在同一文件夹中。
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">SHUBHI KHANDELWAL </a>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li class="active"><a href="#">HOME</a></li>
<li class=""><a href="#">WORKS</a></li>
<li class=""><a href="#">CONTACT</a></li>
</ul>
</div>
</div>
</nav>
<script src="https://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>
答案 0 :(得分:0)
控制台中是否有错误消息? 您是否检查了以下HTML结构,然后需要引导程序: https://getbootstrap.com/docs/4.3/components/navs/
所有本地文件都位于正确的文件夹中吗: css / bootstrap.min.css js / bootstrap.min.js
请在此处查看文档以正确包含Bootstrap: https://getbootstrap.com/docs/4.3/getting-started/introduction/
答案 1 :(得分:0)
尝试Bootstrap CDN
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">