html
<template>
<div class="loading">
<Spin class="img">
<Icon type="load-c" size=38 class="demo-spin-icon-load"></Icon>
<div>正在拼命加载中...</div>
</Spin>
</div>
</template>
css
<style scoped>
.loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3);
z-index: 999;
}
.loading .img {
display: block;
width: 200px;
height: 100px;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
font-size: 18px;
color: #fff;
}
/*加载中icon样式*/
.demo-spin-icon-load {
animation: ani-demo-spin 1s linear infinite;
}
@keyframes ani-demo-spin {
from {
transform: rotate(0deg);
}
50% {
transform: rotate(180deg);
}
to {
transform: rotate(360deg);
}
}
</style>
网友评论