href link 不可点击(似乎在 chrome inspect 中有效)
href link not clickable (appears to work in chrome inspect)
希望大家帮帮忙。我目前正在 HTML 和 CSS 上在线课程。作为课程的一部分,我正在练习制作网页。我遇到 header href.
的问题
我正在尝试 link 从 header 到 body 中的某个位置。但是,当我在 chrome 上进行测试时,它不会显示为 hyperlink。使用 chrome 的检查功能将其显示为 link 并且在单击时它可以工作。但是它在检查之外不起作用。
我的HTML如下:
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<link rel="stylesheet" type="text/css" href="landing.css">
</head>
<header>
<h1>
Heading
</h1>
<h2>Services <a href="#services_section"></a></h2>
<div class="tag-line">
</div>
</header>
<body>
<h3>
About
</h3>
<div class="about">
<h4 id="services_section">
<div class="services">
Services
</h4>
<h5>
<div class="contact">
Contact
</h5>
</body>
</html>
超链接有效,问题是没有文本。您需要将 "Services" 放在标签内。
改变
<h2>Services <a href="#services_section"></a></h2>
至
<h2><a href="#services_section">Services</a></h2>
希望大家帮帮忙。我目前正在 HTML 和 CSS 上在线课程。作为课程的一部分,我正在练习制作网页。我遇到 header href.
的问题我正在尝试 link 从 header 到 body 中的某个位置。但是,当我在 chrome 上进行测试时,它不会显示为 hyperlink。使用 chrome 的检查功能将其显示为 link 并且在单击时它可以工作。但是它在检查之外不起作用。
我的HTML如下:
<!DOCTYPE html>
<html>
<head>
<title>Title</title>
<link rel="stylesheet" type="text/css" href="landing.css">
</head>
<header>
<h1>
Heading
</h1>
<h2>Services <a href="#services_section"></a></h2>
<div class="tag-line">
</div>
</header>
<body>
<h3>
About
</h3>
<div class="about">
<h4 id="services_section">
<div class="services">
Services
</h4>
<h5>
<div class="contact">
Contact
</h5>
</body>
</html>
超链接有效,问题是没有文本。您需要将 "Services" 放在标签内。
改变
<h2>Services <a href="#services_section"></a></h2>
至
<h2><a href="#services_section">Services</a></h2>