【问题标题】:Website responsiveness - Iphone needs double click for a link to work网站响应能力 - Iphone 需要双击才能使用链接
【发布时间】:2014-09-25 02:07:29
【问题描述】:

我在 iPhone 上测试我们的网页时遇到了这个奇怪的问题。屏幕右下角有一个“返回顶部”链接,该链接在所有桌面浏览器以及 Android 手机上都运行良好。但是当我们在 iPhone 上测试它时,我们必须点击该链接两次才能让它工作。

你可以在这里看到舞台现场:http://www.maverick-eng.com.php53-14.dfw1-1.websitetestlink.com/

请指教。

谢谢 苏米特

【问题讨论】:

  • 把相关代码放到OP里面。切勿仅依赖外部链接。

标签: javascript html css iphone responsive-design


【解决方案1】:

您可以在这里做两件事:

<a href="#top">Back to top of page</a>

或使用 JavaScript

/* You can set the scrollTop */

$('html,body').scrollTop(0);

/* Or if you want a little animation instead of a snap to the top: */

$('html, body').animate({ scrollTop: 0 }, 'fast');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-05-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-07
    • 2018-07-02
    相关资源
    最近更新 更多