_loading.css 1.03 KB
.loading-mask {
    @keyframes scale {
        0% {
            opacity: 1;
            transform: scale(1);
        }

        45% {
            opacity: 0.7;
            transform: scale(0.1);
        }

        80% {
            opacity: 1;
            transform: scale(1);
        }
    }
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.1);

    .loading {
        position: absolute;
        top: 50%;
        left: 50%;
        margin-top: -20px;
        margin-left: -60px;
        width: 120px;
        height: 40px;

        > div {
            $init: 0.12;

            @for $i from 1 to 3 {
                $init: ($i + 1) * 0.12;

                &:nth-child($i) {
                    animation: scale 0.75s $(init)s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08);
                }
            }
            display: inline-block;
            margin: 4px;
            width: 30px;
            height: 30px;
            border-radius: 100%;
            background: #fff;
        }
    }
}