告诉我们发生了什么:
在此详细描述你的问题。
失败:每个 .nav-link
都应该有一个 href
属性,该属性链接到其对应的 .main-section
(例如,如果你单击包含文本 “Hello world” 的 .nav-link
元素,页面导航到具有该 id 的 section
元素)。
就这一步过不去,反复检查,没发现哪里错了
你目前的代码
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<main id="main-doc">
<nav id="navbar">
<header>text-doc</header>
<a class="nav-link" href="caption-one" >caption-one</a>
<a class="nav-link" href="caption-tow" >caption-tow</a>
<a class="nav-link" href="caption-treen" >caption-treen</a>
<a class="nav-link" href="caption-four" >caption-four</a>
<a class="nav-link" href="caption-five" >caption-five</a>
</nav>
<section id="caption-one" class="main-section">
<header>caption-one</header>
<code></code>
<code></code>
<code></code>
<code></code>
<code></code>
</section>
<section id="caption-tow" class="main-section">
<header>caption-tow</header>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</section>
<section id="caption-treen" class="main-section">
<header>caption-treen</header>
<p></p>
<p></p>
<p></p>
<p></p>
</section>
<section id="caption-four" class="main-section">
<header>caption-four</header>
<p></p>
<p></p>
</section>
<section id="caption-five" class="main-section">
<header>caption-five</header>
<p></p>
<p></p>
<p></p>
<p></p>
</section>
</main>
</body>
</html>
/* file: styles.css */
@media (max-width:600px) {
body {
color:red;
}
}
你的浏览器信息:
用户代理是: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
挑战: 技术文档页 - 制作一个技术文档页面
挑战的链接: