当后台 ajax 需要较长时间加载时,需要给用户提示,不然用户可能不知道你在做什么,屏幕却无反应。
比如在屏幕上显示几个变化的小球:http://kevinqq.herokuapp.com/bootstrap/manage/logs?page=1
https://tianya.herokuapp.com/articles/ty556242?page=1
CSS
.loading-overlay {
content: "";
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
opacity: .8;
background: rgba(0, 0, 0, 0.1);
transition: all .6s;
}
.sk-three-bounce {
position: absolute;
top: 60%;
left: 48%;
opacity: .8;