简体   繁体   English

如何添加锚标记以从页面跳转到另一页面的特定位置

[英]How to add Anchor Tags To Jump To Specific Location from page to another page

I want to use Anchor Tag for jump to relevant section of a page but i want to done this jump from any page for example WORK.html page(by menu). 我想使用锚标签跳转到页面的相关部分,但是我想从任何页面执行此跳转,例如WORK.html页面(按菜单)。 I have a menu that there is in all pages. 我有一个所有页面都有的菜单。 i want with click on any option, jump to relevant section but when am in another pages too. 我想单击任何选项,然后跳至相关部分,但同时在其他页面中。

such as this image: menu image! 如该图: 菜单图!

in the image, I want to go from WORK page to Scaffolding or Typography that are on a single page. 在图像中,我要从“工作”页面转到单个页面上的“脚手架”或“版式”。 this code is in menu codes in WORK.html: 此代码在WORK.html的菜单代码中:

    <a href="STYLE.html">go to relevant section</a>

but should instead of "STYLE.html" jump to relevant section from "STYLE.html" 但应从“ STYLE.html”跳转到相关部分,而不是“ STYLE.html”

how to done this work??? 如何完成这项工作???

Try to add an id to the div regarding the relevant part of your page. 尝试向div添加有关页面相关部分的ID。 So put this preceded by the symbol id # at the end of the page link. 因此,请在页面链接的末尾加上符号ID#。

For example: 例如:

<a href="STYLE.html#myRelevantSectionId">go to relevant section</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM