当我向下滚动页面时,我试图将导航栏固定在页面顶部。我包括了一个JS小提琴:https://jsfiddle.net/1qsy0Lwu/我完全按照w3schools的示例进行操作,但是它不起作用。请帮忙。
在我的研究中,我注意到offsetTop和offset()。top之间存在差异。我觉得问题出在我CSS中。
我还注意到,当在JavaScript中应用offsetTop时,导航栏中的链接不起作用。尽管控制台中没有错误显示。但是,当我实现offset()。top时,控制台中会显示一个错误...但是导航栏链接有效
HTML
<div id="navbar">
<a class="active" href="#">Apps</a>
<a href="#">TAB 1 </a>
<a href="#">TAB 2</a>
<a href="#">TAB 3</a>
<a href="#">TAB 4</a>
</div>
<div class="container">
CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT CONTENT
</div>
CSS
#navbar {
overflow: hidden;
background-color: #161717;
margin-top: 0.1%;
text-align: center;
}
#navbar a {
display: inline-block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
#navbar a:hover {
background-color: #ddd;
color: black;
}
#navbar a.active {
background-color: #1e272d;
color: white;
}
.container {
padding: 16px;
}
.sticky {
position: fixed;
top: 0;
width: 100%;
}
.sticky + .container {
padding-top: 1000px;
}
JS
$(document).ready(function () {
window.onscroll = function () { myFunction() };
var navbar = document.getElementById("navbar");
var sticky = navbar.offsetTop;
function myFunction() {
if (window.pageYOffset >= sticky) {
navbar.classList.add("sticky")
} else {
navbar.classList.remove("sticky");
}
}
});
答案 0 :(得分:2)
您已经错过了包含jquery的功能,而CSS有点不完善了。
在此处查看有效的示例:https://jsfiddle.net/d4xLjuth/1/
我包含了jquery并将以下内容更新为css:
.sticky {
position: fixed;
top: 0;
width: 100%;
background-color:red !important;
}
.sticky + .container {
padding-top: 10px;
}
答案 1 :(得分:1)
您可以将纯CSS与position: sticky一起使用。要定义该值离顶部有多远,请修改top
属性。
nav {
position: sticky;
top: 0;
}
body {
padding: 0;
margin: 0;
}
nav {
position: sticky;
top: 0;
}
nav>ul {
margin: 0;
list-style-type: none;
padding: 0;
display: flex;
flex-direction: row;
background: red
}
nav>ul>li {
padding: 10px;
}
<nav>
<ul>
<li>Item</li>
<li>Item</li>
<li>Item</li>
</ul>
</nav>
<div>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
</div>
body {
padding: 0;
margin: 0;
}
nav {
margin-top: 80vh;
position: sticky;
top: 0;
}
nav>ul {
margin: 0;
list-style-type: none;
padding: 0;
display: flex;
flex-direction: row;
background: red
}
nav>ul>li {
padding: 10px;
}
<nav>
<ul>
<li>Item</li>
<li>Item</li>
<li>Item</li>
</ul>
</nav>
<div>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
<p>Content</p>
</div>
答案 2 :(得分:1)
使用 Intersection_Observer_API 实现:
https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
在此处查看工作示例: https://jsfiddle.net/Hamzailyas434/1wz5g6L9/7/
const nav = document.querySelector('.nav');
const header = document.querySelector('.header');
const navHeight = nav.getBoundingClientRect().height;
const stickyNav = function (entries) {
const [entry] = entries;
if (!entry.isIntersecting) nav.classList.add('sticky');
else nav.classList.remove('sticky');
};
let options = {
root: null,
threshold: 0,
rootMargin: `-${navHeight}px`,
};
const headerObserver = new IntersectionObserver(stickyNav, options);
headerObserver.observe(header);
/* The page is NOT responsive. You can implement responsiveness yourself if you wanna have some fun ? */
:root {
--color-primary: #5ec576;
--color-secondary: #ffcb03;
--color-tertiary: #ff585f;
--color-primary-darker: #4bbb7d;
--color-secondary-darker: #ffbb00;
--color-tertiary-darker: #fd424b;
--color-primary-opacity: #5ec5763a;
--color-secondary-opacity: #ffcd0331;
--color-tertiary-opacity: #ff58602d;
--gradient-primary: linear-gradient(to top left, #39b385, #9be15d);
--gradient-secondary: linear-gradient(to top left, #ffb003, #ffcb03);
}
* {
margin: 0;
padding: 0;
box-sizing: inherit;
}
html {
font-size: 62.5%;
box-sizing: border-box;
}
body {
font-family: 'Poppins', sans-serif;
font-weight: 300;
color: #444;
line-height: 1.9;
background-color: #f3f3f3;
}
/* GENERAL ELEMENTS */
.section {
padding: 15rem 3rem;
border-top: 1px solid #ddd;
transition: transform 1s, opacity 1s;
}
.section--hidden {
opacity: 0;
transform: translateY(8rem);
}
.section__title {
max-width: 80rem;
margin: 0 auto 8rem auto;
}
.section__description {
font-size: 1.8rem;
font-weight: 600;
text-transform: uppercase;
color: var(--color-primary);
margin-bottom: 1rem;
}
.section__header {
font-size: 4rem;
line-height: 1.3;
font-weight: 500;
}
.btn {
display: inline-block;
background-color: var(--color-primary);
font-size: 1.6rem;
font-family: inherit;
font-weight: 500;
border: none;
padding: 1.25rem 4.5rem;
border-radius: 10rem;
cursor: pointer;
transition: all 0.3s;
}
.btn:hover {
background-color: var(--color-primary-darker);
}
.btn--text {
display: inline-block;
background: none;
font-size: 1.7rem;
font-family: inherit;
font-weight: 500;
color: var(--color-primary);
border: none;
border-bottom: 1px solid currentColor;
padding-bottom: 2px;
cursor: pointer;
transition: all 0.3s;
}
p {
color: #666;
}
/* This is BAD for accessibility! Don't do in the real world! */
button:focus {
outline: none;
}
img {
transition: filter 0.5s;
}
.lazy-img {
filter: blur(20px);
}
/* NAVIGATION */
.nav {
display: flex;
justify-content: space-between;
align-items: center;
height: 9rem;
width: 100%;
padding: 0 6rem;
z-index: 100;
}
/* nav and stickly class at the same time */
.nav.sticky {
position: fixed;
background-color: rgba(255, 255, 255, 0.95);
}
.nav__logo {
height: 4.5rem;
transition: all 0.3s;
}
.nav__links {
display: flex;
align-items: center;
list-style: none;
}
.nav__item {
margin-left: 4rem;
}
.nav__link:link,
.nav__link:visited {
font-size: 1.7rem;
font-weight: 400;
color: inherit;
text-decoration: none;
display: block;
transition: all 0.3s;
}
.nav__link--btn:link,
.nav__link--btn:visited {
padding: 0.8rem 2.5rem;
border-radius: 3rem;
background-color: var(--color-primary);
color: #222;
}
.nav__link--btn:hover,
.nav__link--btn:active {
color: inherit;
background-color: var(--color-primary-darker);
color: #333;
}
/* HEADER */
.header {
padding: 0 3rem;
height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
}
.header__title {
flex: 1;
max-width: 115rem;
display: grid;
grid-template-columns: 3fr 2fr;
row-gap: 3rem;
align-content: center;
justify-content: center;
align-items: start;
justify-items: start;
}
h1 {
font-size: 5.5rem;
line-height: 1.35;
}
h4 {
font-size: 2.4rem;
font-weight: 500;
}
.header__img {
width: 100%;
grid-column: 2 / 3;
grid-row: 1 / span 4;
transform: translateY(-6rem);
}
.highlight {
position: relative;
}
.highlight::after {
display: block;
content: '';
position: absolute;
bottom: 0;
left: 0;
height: 100%;
width: 100%;
z-index: -1;
opacity: 0.7;
transform: scale(1.07, 1.05) skewX(-15deg);
background-image: var(--gradient-primary);
}
/* FEATURES */
.features {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4rem;
margin: 0 12rem;
}
.features__img {
width: 100%;
}
.features__feature {
align-self: center;
justify-self: center;
width: 70%;
font-size: 1.5rem;
}
.features__icon {
display: flex;
align-items: center;
justify-content: center;
background-color: var(--color-primary-opacity);
height: 5.5rem;
width: 5.5rem;
border-radius: 50%;
margin-bottom: 2rem;
}
.features__icon svg {
height: 2.5rem;
width: 2.5rem;
fill: var(--color-primary);
}
.features__header {
font-size: 2rem;
margin-bottom: 1rem;
}
<!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="shortcut icon" type="image/png" href="img/icon.png" />
<link
href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="style.css" />
<title>Bankist | When Banking meets Minimalist</title>
</head>
<body>
<header class="header">
<nav class="nav">
<img
src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBUSFBcVFBQXFxcXGxccFR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1VL12vC69VqUhBMJta9ocyBbiASmm+9fSEK677U9YFOqx5d0DHTYc++A4vJUWpWODZUrX777R71QNcw0zCLCloCPXBKbad47pl6pfePWZYFxW0NVi1jAMSWGtSlIeOxbevpCsNNxz74FGq55d0AmjVetIXrdNqbWhGYrYQ4Swbmt4BvVab12vC69VqUhBMJsaXhzIFuIBKab719IKar7U9YRTqseXdAx02HPvgF16bUrCdVqvXe8OVA1zDTMIsKWgF63Vam9oTRovWsOMsC4raGqxaxgFrqttT1grptvX0gYabjn3wKNVzy7oBNGq9aQvW6bU2tCMxWwhwlg3NbwDeq03rteF16rUpCCYTY0vDmQLcQCU033r6QU1X2p6winVY8u6BjpsOffALr02pWE6rVeu94cqBrmGmYRYUtAL1uq1N7QmjRetYcZYFxW0NVi1jALXVbanrBXTbevpAw03HPvgUarnl3QCaNV60hetpam1oRmK2EOEsG973gP/Z"
alt="Bankist logo"
class="nav__logo"
id="logo"
designer="Hamza"
data-version-number="3.0"
/>
<ul class="nav__links">
<li class="nav__item">
<a class="nav__link" href="#section--1">Features</a>
<!-- <a class="nav__link" href="#section--1">Features</a> -->
</li>
<li class="nav__item">
<a class="nav__link" href="#section--2">Operations</a>
</li>
<li class="nav__item">
<a class="nav__link" href="#section--3">Testimonials</a>
</li>
<li class="nav__item">
<a class="nav__link nav__link--btn btn--show-modal" href="#"
>Open account</a
>
</li>
</ul>
</nav>
<div class="header__title">
<h1>
When
<!-- Green highlight effect -->
<span class="highlight">banking</span>
meets<br />
<span class="highlight">minimalist</span>
</h1>
<h4>A simpler banking experience for a simpler life.</h4>
<button class="btn--text btn--scroll-to">Learn more ↓</button>
<img
src="img/hero.png"
class="header__img"
alt="Minimalist bank items"
/>
</div>
</header>
<section class="section" id="section--1">
<div class="section__title">
<h2 class="section__description">Features</h2>
<h3 class="section__header">
Everything you need in a modern bank and more.
</h3>
</div>
<div class="features">
<img
src="img/digital-lazy.jpg"
data-src="img/digital.jpg"
alt="Computer"
class="features__img lazy-img"
/>
<div class="features__feature">
<div class="features__icon">
<svg>
<use xlink:href="img/icons.svg#icon-monitor"></use>
</svg>
</div>
<h5 class="features__header">100% digital bank</h5>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Unde alias
sint quos? Accusantium a fugiat porro reiciendis saepe quibusdam
debitis ducimus.
</p>
</div>
<div class="features__feature">
<div class="features__icon">
<svg>
<use xlink:href="img/icons.svg#icon-trending-up"></use>
</svg>
</div>
<h5 class="features__header">Watch your money grow</h5>
<p>
Nesciunt quos autem dolorum voluptates cum dolores dicta fuga
inventore ab? Nulla incidunt eius numquam sequi iste pariatur
quibusdam!
</p>
</div>
<img
src="img/grow-lazy.jpg"
data-src="img/grow.jpg"
alt="Plant"
class="features__img lazy-img"
/>
<img
src="img/card-lazy.jpg"
data-src="img/card.jpg"
alt="Credit card"
class="features__img lazy-img"
/>
<div class="features__feature">
<div class="features__icon">
<svg>
<use xlink:href="img/icons.svg#icon-credit-card"></use>
</svg>
</div>
<h5 class="features__header">Free debit card included</h5>
<p>
Quasi, fugit in cumque cupiditate reprehenderit debitis animi enim
eveniet consequatur odit quam quos possimus assumenda dicta fuga
inventore ab.
</p>
</div>
</div>
</section>
<div class="overlay hidden"></div>
<script src="script.js"></script>
</body>
</html>