首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在模态后面获得spin.js

如何在模态后面获得spin.js
EN

Stack Overflow用户
提问于 2015-12-19 21:58:00
回答 1查看 363关注 0票数 0

我有一个模式,它显示了一些图形,而在背景中,我有一些来自spin.js的旋转轮,这表明已经完成了一些工作(见图所附)。我希望模态在顶部,而目前的纺车是在顶部的模态。我找不到适合spin.js的医生.有人知道这是否存在吗?这是我的spin.js设置

代码语言:javascript
复制
        var opts = {
            lines: 9, // The number of lines to draw
            length: 10, // The length of each line
            width: 3, // The line thickness
            radius: 6, // The radius of the inner circle
            corners: 1, // Corner roundness (0..1)
            rotate: 58, // The rotation offset
            direction: 1, // 1: clockwise, -1: counterclockwise
            color: '#000000 ', // #rgb or #rrggbb or array of colors
            speed: 0.9, // Rounds per second
            trail: 100, // Afterglow percentage
            shadow: false, // Whether to render a shadow
            hwaccel: false, // Whether to use hardware acceleration
            className: 'spinner', // The CSS class to assign to the spinner
            zIndex: 2e9, // The z-index (defaults to 2000000000)
            top: '50%', // Top position relative to parent
            left: '50%' // Left position relative to parent
        };

我想zindex可能是让这件事起作用的工具?知道我需要做什么吗?谢谢卡尔

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-12-19 22:37:27

您需要将旋转器的zIndex属性设置为低于模式的属性。例如:

代码语言:javascript
复制
#myModal {
    z-index: 100;
}
代码语言:javascript
复制
var opts = {
    zIndex: 50,
    // other options...
};

供您参考,spin.js文档如下:http://fgnass.github.io/spin.js/

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34375810

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档