【发布时间】:2016-12-28 18:48:16
【问题描述】:
我有一个视差滚动网站,上面有箭头指示用户他们需要向下滚动才能查看内容。
我希望用户能够单击箭头,然后滚动到相关部分。据我了解,我需要做的就是向该部分添加一个 ID,然后在箭头的 href 标记中引用它。我有以下内容,由于某种原因无法正常工作,只是将 ID 添加到 URL 的末尾,但不会向下滚动:
HTML:
<!-- Button -->
<a class="green-arrow" href="#backupsection">
<img src="img/green-arrow.svg">
</a>
<!-- Backup 2 -->
<section id="backupsection" class="background">
<div class="content-wrapper-left">
<p class="backup-text-title">Methods</p>
<p class="backup-text">No surprises here then: tape as a primary backup method remains at an all-time low of 3%. This is the first year it hasn’t fallen – possibly indicative of how stubborn some legacy systems (often populated with static compliance data) can be.</p>
</div>
</section>
【问题讨论】: