我有一个 iframe,我想在其中滚动到特定的锚点。我在 stackoverflow 上尝试了很多解决方案,但似乎都没有。该页面在普通浏览器中滚动良好,但在 IOS 设备上不会滚动。这是代码:
.grafieken {
position: relative;
overflow: hidden;
height: 350px;
-webkit-overflow-scrolling:touch;
overflow-y: scroll;
}
<div class="grafieken">
<iframe src="http://www.externalsite.com/#anchor" scrolling="no" frameborder="0" allowfullscreen></iframe>
</div>
问题是我不希望用户在 iframe 中滚动,我只希望 iframe 自动向下滚动到锚点。这在 Android 上是可能的,但在 IOS 上似乎是不可能的。我真的希望有人能帮助我。