css
<link href="{{asset('lib/loaders.min.css')}}" rel="stylesheet">
html
<div class="loader">
<div class="loader-inner ball-pulse loader-in">
<div></div>
<div></div>
<div></div>
</div>
</div>
自定义css
.loader {
background: #fff;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 99999;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.loader-in > div {
background-color: #399;
}
js淡出
$(".loader").fadeOut(500);
github:
https://github.com/ConnorAtherton/loaders.css