在Firefox中加载后,iframe会滚动到iframe

时间:2018-11-04 08:38:40

标签: iframe scroll onload

我建立了一个带有iframe的网页www.negovista.com。在Firefox中,它会在页面中间加载后立即跳转到iframe,而在chrome / edge等中则不会发生。

我尝试了不同的解决方案,例如

4

虽然似乎没有任何作用。

我也尝试添加

<iframe src=URL style="display: none;" onload="this.style.display='block';" href="...">

<iframe src=URL style="position: absolute; top: -9999em; visibility: hidden;" onload="this.style.position='static'; this.style.visibility='visible';" href="...">

<iframe src=URL style="position: absolute; top: -9999em; visibility: hidden;" onload="this.style.position='static'; this.style.visibility='visible';" href="...">

<iframe src=URL onLoad="self.scrollTo(0,0)">

<iframe src=URL onLoad="self.scrollTo(0,0)" scrolling="no">

pointer-events:none;

使用CSS,但两者均无效

有人知道如何使iframe停止自动滚动吗?

将会有很大的帮助!

Thx 弗莱明

0 个答案:

没有答案