【问题标题】:jQuery Supersized loader always visiblejQuery Supersized 加载器始终可见
【发布时间】:2011-10-07 17:59:48
【问题描述】:

我正在尝试使用 HTML5 样板和 jQuery Supersized 脚本。

在 dev 中一切正常,但是,在使用 HTML5 样板构建脚本后,#supersized-loader 始终在屏幕上可见,它不会消失。

使用构建脚本,我的 js 文件被连接起来,但是,我已经从连接中删除了所有超大脚本,我仍然面临同样的问题。

可以在这里找到一个活生生的例子 - http://zetamedia.co.uk/supersized,如果有人能阐明可能发生的事情。

谢谢。

【问题讨论】:

    标签: jquery html5boilerplate


    【解决方案1】:

    以前从未尝试过这些,但看起来它与 z-indexes 相关,尤其是在 #supersized-loader 规则中。尝试改变

    #supersized-loader {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: 0;
        width: 60px;
        height: 60px;
        margin: -30px 0 0 -30px;
        text-indent: -999em;
        background: url(../img/progress.gif) no-repeat center center;
    }
    

    #supersized-loader {
        position: absolute;
        top: 50%;
        left: 50%;
        z-index: -1000; /*changed this*/
        width: 60px;
        height: 60px;
        margin: -30px 0 0 -30px;
        text-indent: -999em;
        background: url(../img/progress.gif) no-repeat center center;
    }
    

    在 supersized.css 中(或直接在页面上)

    【讨论】:

    • 谢谢约瑟夫,解决了问题。我花了很长时间试图在 javascript 中解决 CSS z-index 让我忘记的问题。再次感谢!
    猜你喜欢
    • 2012-05-09
    • 1970-01-01
    • 2017-06-15
    • 2011-05-10
    • 2013-01-23
    • 2019-07-23
    • 1970-01-01
    • 2015-09-12
    相关资源
    最近更新 更多