我为基本的引导项目新建了投资组合网站。不幸的是,从导航栏滚动页面并没有给我预期的结果。
是否有navbar
的属性可以让我进行完美的滚动?
我尝试了一些有关滚动导航栏的引导教程。
`````
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width-device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" a href="css/bootstrap.css">
<link rel="stylesheet" a href="css/fonts.css">
<link rel="stylesheet" href="css/mystyle.css">
<script src="js/bootstrap.jquery.js"></script>
<script src="ja/bootstrap.js"></script>
<script src="js/proper.js"></script>
<title>Python Buddha</title>
</head>
<body data-spy="scroll" data-target=".navbar" data-offset="50">
<!-- Navbar -->
<div id = "Header">
<nav class="navbar navbar-expand-lg navbar-light bg-light fixed-top style=">
<div class="container">
<button class="navbar-toggler" data-toggle="collapse" data-target="#Navbar">
<span class="navbar-toggler-icon"></span>
</button>
<a href="#" class="navbar-brand"><h3>Python Buddha</h3></a>
<div class="collapse navbar-collapse" id="navbar">
<ul class="navbar-nav ml-auto">
<li class="nav-item"><a href="#About" class="nav-link">About Me</a></li>
<li class="nav-item"><a href="#Skills" class="nav-link">My Skills</a></li>
<li class="nav-item"><a href="#Projects" class="nav-link">Projects</a> </li>
<li class="nav-item"><a href="#Contact" class="nav-link">Contact</a> </li>
</ul>
</div>
</div>
</nav>
</div>
<!-- ShowCase -->
<div id="bg-img"></div>
<!-- About Me -->
<div id="About">
<div class="container">
<div class="row">
<div class="col">
<div id="AboutData">
<div class="card bg-white" size="300">
<div class="card-title">
<div class="media">
<!-- <img src="img/6.jpg" width="150" height="220" class="img-fluid rounded-top mx-5 d-none d-lg-block">-->
<div class="media-body">
<h3 class="h1 ml-5">Hello!</h3>
<p class="text-muted ml-5">Computer Engineer</p>
<div class="container">
<!-- <table class="table table-responsive ml-4">
<tr>
<td class="text-muted">Age</td>
<td>:</td>
<td>26 Years Old</td>
</tr>
<tr>
<td class="text-muted">Email</td>
<td>:</td>
<td>pythonbuddha@gmail.com</td>
</tr>
<tr>
<td class="text-muted">Website</td>
<td>:</td>
<td>www.pythonbuddha.com</td>
</tr>
<tr>
<td class="text-muted">Phone</td>
<td>:</td>
<td>+121 12121 999</td>
</tr>
</table>-->
</div>
</div>
</div>
</div>
</div>
<div class="card-footer bg-dark">
<a href="#"><i class="fa fa-facebook-official"></i></a>
<a href="#"><i class="fa fa-twitter fa-2x mx-3"></i></a>
<a href="#"><i class="fa fa-youtube fa-2x mx-3"></i></a>
<a href="#"><i class="fa fa-pinterest fa-2x mx-3"></i></a>
<a href="#"><i class="fa fa-github fa-2x mx-3"></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="container mt-5">
<div class="row">
<div class="col">
<span class="bg-dark text-white">About Me</span><hr class="bg-dark">
<p class="lead text-justify">Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton. Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.
Helllo this is bootstrap. This is home page of python buddha. I write code and I also do meditaiton.</p>
</div>
</div>
</div>
</div>
<!-- Skills -->
<div id ="Skills">
<div class="container mt-5">
<span class="bg-dark text-white">My Skills</span><hr class="bg-dark">
<div class="row">
<div class="col">
<div class="card bg-white">
<h3 class="ml-3 my-3">HTML</h3>
<div class="progress mx-3">
<div class="progress-bar bg-dark" style="width: 95%">95%</div>
</div>
<h3 class="ml-3 my-3">CSS</h3>
<div class="progress mx-3">
<div class="progress-bar bg-dark" style="width: 95%">95%</div>
</div>
<h3 class="ml-3 my-3">JavaScript</h3>
<div class="progress mx-3">
<div class="progress-bar bg-dark" style="width: 95%">90%</div>
</div>
<h3 class="ml-3 my-3">Java</h3>
<div class="progress mx-3">
<div class="progress-bar bg-dark" style="width: 95%">90%</div>
</div>
<h3 class="ml-3 my-3">Python</h3>
<div class="progress mx-3">
<div class="progress-bar bg-dark" style="width: 95%">95%</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Projects -->
<div id="Projects">
<div class="container mt-5">
<span class="bg-dark text-white">Projects</span><hr class="bg-dark">
<div class="row">
<div class="col-lg-6">
<div class="card bg-white">
<img src="img/3.jpg/" width="200" height="80" class="img-fluid">
</div>
</div>
</div>
</div>
</div>
</body>
````
</html>
我希望点击导航栏上的每个选项都可以为我提供网页展示页面上的确切页面。