同一页主页仍然无法在移动设备上运行

时间:2014-06-02 08:54:10

标签: html iphone ipad hyperlink anchor

好的,所以我一直在寻找这个问题的答案,并且虽然有很多问题都在同一条线上,但没有一个问题能解决我的问题。

使用以下代码,我试图将按钮链接到页面下方的部分..

<a href="#tour" class="input"><img src="assets/images/seetheapp.png" alt="Download the App" width="300" height="48" style="margin-bottom: 100px;"></a>

使用..来调用它。

<a id="tour"></a>

在桌面上工作正常,但在iPhone上根本没有(甚至弹出选项不起作用),只能在横向模式下在iPad上运行......我完全难过了!

目前正在使用(pulsatedate.com),因此需要尽快对其进行排序。

3 个答案:

答案 0 :(得分:0)

在这种情况下,链接到现有的section / div id而不是锚是一种合适的解决方法。

<a href="#page-twitter" class="input"><img src="assets/images/seetheapp.png" alt="Download the App" width="300" height="48" style="margin-bottom: 100px;"></a>

答案 1 :(得分:0)

仔细查看<head>标记,找到一些文件覆盖并禁用锚定我遇到过这种情况:

忘了禁用jquery.mobile-1.4.2.js,因为我在替换其他框架之前使用过,忘了删除或评论

答案 2 :(得分:0)

使用一些jquery时,单击锚元素时隐藏或删除您的活动类

这是示例代码,

<header class="header-section">
  <ul class="main-menu">
    <li>
        <a href="#home" class="js-hide-header">
            &nbsp;Home
        </a>
    </li>
    <li>
        <a href="#about" class="js-hide-header">
            &nbsp;About
        </a>
    </li>
    <li>
        <a href="#service" class="js-hide-header">
            &nbsp;Services
        </a>
    </li>
    <li>
        <a href="#contact" class="js-hide-header">
            &nbsp;Contact
        </a>
    </li>
  </ul>
</header>

内部.js文件

$(".js-hide-header").on('click', function(e) {
    $('.header-section').removeClass('active');
});
相关问题