console
<div class="d1 cy-loading" load-tip="正在加载中..."></div>
* {margin: 0}
.d1 {
width: 100vw;
height: 100vh;
position: relative;
}
/* ------------------------------------------- */
.cy-loading::before,
.cy-loading::after {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 5;
margin: auto;
}
.cy-loading::before {
content: attr(load-tip);
font-size: 13px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255, 0.95);
}
.cy-loading::after {
top: -62px;
width: 20px;
height: 20px;
border-radius: 50%;
border: 1px solid #0f8cd4;
border-top-color: transparent;
z-index: 5;
animation: rotate1t 0.8s linear infinite;
}
@keyframes rotate1t {
100% {
transform: rotate(1turn);
}
}