Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
锚定链接HTML_Html_Hyperlink_Anchor - Fatal编程技术网

锚定链接HTML

锚定链接HTML,html,hyperlink,anchor,Html,Hyperlink,Anchor,我正在尝试为我的站点设置一个锚链接,以跳转到同一页面上的特定标题。下面是我当前的代码,但是当你选择链接时,什么也没有发生。任何帮助都会很好,谢谢 Section I want the link to jump to <div class="heading1"> <h2 style="margin-bottom:-5px;font-size:40px;"><a id="#work"></a>content</h2> <p styl

我正在尝试为我的站点设置一个锚链接,以跳转到同一页面上的特定标题。下面是我当前的代码,但是当你选择链接时,什么也没有发生。任何帮助都会很好,谢谢

Section I want the link to jump to

<div class="heading1">
<h2 style="margin-bottom:-5px;font-size:40px;"><a id="#work"></a>content</h2>
<p style="font-size: 26px;">content</p>
</div>

Link

<div class="contact mobile">
<a href=“#work”>Work</a>
</div>

需要将href指向要跳转到href=jump的div的id

所容纳之物

内容


brother remove hash from attribute id=work use just id=work>

不属于id属性,并且不需要单独的元素,只需将id添加到节点即可。在提问之前,请尝试进行更多搜索,因为这个问题有很多重复项。