链接回原始链接源(同一页面上的两个链接),反之亦然

时间:2015-02-15 16:01:30

标签: html css

2“反之亦然” - 链接在同一网页

最简单的方法是什么......

  • ... LINK1指的是LINK2

  • ...让LINK2回复LINK1?

执行此操作的最基本方法可能是通过具有唯一span的{​​{1}}:

id

<a href=#LINK2><span id="LINK1>This is LINK1 referring to LINK2</span><a/>

然而,是否有更快,更少劳动密集和更优雅的解决方案(参见正在建设的文件,动态文件或大文件)?

1 个答案:

答案 0 :(得分:1)

你可以使用

<a href="#link2" id="link1">This is LINK1 referring to LINK2.<a/>
<a href="#link1" id="link2">This is LINK2, which refers back to LINK1.</a>

&#13;
&#13;
.space {
  height: 100000px;
  display: block;
}
&#13;
<a href="#link2" id="link1">This is LINK1 referring to LINK2.<a/>
<span class="space"></span>
<a href="#link1" id="link2">This is LINK2, which refers back to LINK1.</a>
&#13;
&#13;
&#13;