我有一个页面,让我们说第2页,填写了几个<section>:
<section class="box special" id="section1">
//
</section>
<section class="box special" id="section2">
//
</section>
<section class="box special" id="section3">
//
</section>
<section class="box special" id="section4" style="background:#3399ff;">
//
</section>
Run Code Online (Sandbox Code Playgroud)
然后我有另一页,page1,我想在其中放置一个锚链接
<ul class="actions">
<li><a href="page2.php" class="button">Link to page2</a></li>
</ul>
Run Code Online (Sandbox Code Playgroud)
我想要实现的是设置这个锚点链接,以便在第2页中找到特定<section>的,而不仅仅是在第2页的顶部.那可能吗?如果是这样,怎么样?
html ×1