Overlay with spinner

前端 未结 6 1246
忘了有多久
忘了有多久 2021-01-30 16:15

I\'m trying to create an overlay that overlays a page with a spinner in the middle. What\'s the simplest way to accomplish this? I only need to worry about IE 8 and above.

6条回答
  •  情深已故
    2021-01-30 17:02

    Here is an Pure CSS endless spinner. Position absolute, to place the buttons on top of each other.

    button {
                position: absolute;
                width: 150px;
                font-size: 120%;
                padding: 5px;
                background: #B52519;
                color: #EAEAEA;
                border: none;
                margin: 50px;
                border-radius: 5px;
                display: flex;
                align-content: center;
                justify-content: center;
                transition: all 0.5s;
                cursor: pointer;
            }
    
            #orderButton:hover {
                color: #c8c8c8;
            }
    
            #orderLoading {
                animation: rotation 1s infinite linear;
                height: 20px;
                width: 20px;
                display: flex;
                justify-content: center;
                align-items: center;
                border-radius: 100%;
                border: 2px solid;
                border-style: outset;
                color: #fff;
            }
    
            @keyframes rotation {
                from {
                    transform: rotate(0deg);
                }
                to {
                    transform: rotate(360deg);
                }
            }
    
    

提交回复
热议问题