簡體   English   中英

如何在模態背后獲取spin.js

[英]How to get spin.js behind a modal

我有一個模態,其中顯示了一些圖形,而在后台,我有來自spin.js的一些紡車,它們指示已完成一些工作(請參見下圖)。 我希望模態位於頂部,而當前的紡車位於模態頂部。 我找不到適用於spin.js的文檔...有人知道它是否存在嗎? 這是我的spin.js設置

        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可能是使它工作的工具? 知道我需要做什么嗎? 謝謝卡爾 在此處輸入圖片說明

您需要將微調器的zIndex屬性設置為低於模態的zIndex屬性。 例如:

#myModal {
    z-index: 100;
}
var opts = {
    zIndex: 50,
    // other options...
};

供您參考, spin.js文檔在這里: http : spin.js

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM