最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to have a Loading Spinner Animation on top of a Bootstrap Modal - Stack Overflow

programmeradmin3浏览0评论

I am trying to have a spinner animation on button click. This Works fine from a page when there is no Bootstrap Modal Open. But when a Bootstrap Modal is Open, the Spinner hides behind the Bootstrap Modal

I have tried this

Expecting the Spinner to be above the Modal Bootstrap

I am trying to have a spinner animation on button click. This Works fine from a page when there is no Bootstrap Modal Open. But when a Bootstrap Modal is Open, the Spinner hides behind the Bootstrap Modal

I have tried this

Expecting the Spinner to be above the Modal Bootstrap

Share Improve this question edited Aug 21, 2019 at 11:04 xmaster 1,0507 silver badges21 bronze badges asked Aug 20, 2019 at 11:24 shadab mominshadab momin 1391 gold badge1 silver badge7 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

Change the place of your loadingoverlay. the loadingoverlay has to be in the modal.

Example

Need to also give the setInterval for javascript spinner.

You have to give a bigger z-index to the Loading Spinner, than the Modal's z-index.

Let's try this:

#loadingoverlay {
    position: fixed;
    top: 0;
    z-index: 9999;
    width: 100%;
    height: 100%;
    display: none;
    background: rgba(0,0,0,0.6);
}

Provide the z-index value. Thats creating issue

z-index: 9999;

发布评论

评论列表(0)

  1. 暂无评论