【发布时间】:2019-01-30 06:54:54
【问题描述】:
我使用 html5、css3 和 bootstrap 创建了一个 html 页面。问题是导航栏菜单没有突出显示/选择指向部分的项目。我希望当我向下滚动到其他部分时,导航栏应该在其菜单中自动突出显示它们。这是sn-p:
section {
width: 100vw;
height: 60vh;
padding: 50px;
}
.cl_white {
color: white;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">
<body data-spy="scroll" data-target=".navbar">
<nav class="navbar navbar-inverse navbar-fixed-bottom">
<ul class="nav navbar-nav">
<li><a href="#home">Home</a></li>
<li><a href="#work">Work</a></li>
<li><a href="#contact">Contact Me</a></li>
</ul>
</nav>
<section id="home" style="background: url(header.jpg); background-size=100% 100%;" class="text-center cl_white">
<h1>Zeshan Sajid | Portfolio</h1>
<p class="lead">Hey Welcome there! Let just read myselft and then contact me for your projects and tasks that you want me to finish on the basis of professinality and perfection with the blend of magical skills. You are always welcome to contact me and ask your queries, as I am available to help you all the time in this regard. Thanks. </p>
</section>
<section id = "work"></section>
<section id = "contact"></section>
</body>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js"></script>
【问题讨论】:
-
Bootstrap 3 CSS 和 Bootstrap 4 JS?
标签: jquery html css bootstrap-4