一个加载css

.loading{position:relative}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes rotate{0%{-webkit-transform:rotate(0) scale(1);transform:rotate(0) scale(1)}50%{-webkit-transform:rotate(180deg) scale(.6);transform:rotate(180deg) scale(.6)}to{-webkit-transform:rotate(360deg) scale(1);transform:rotate(360deg) scale(1)}}.loading:after{z-index:33;position:absolute;top:50%;left:50%;display:inline-block;margin-top:-20px;margin-left:-20px;width:26px;height:26px;border:2px solid #4db6ff;border-radius:100%;background:0 0!important;content:"";border-bottom-color:transparent;-webkit-animation:rotate .75s 0s linear infinite;animation:rotate .75s 0s linear infinite}.loading:before{content: "";position:absolute;left:0;right:0;bottom:0;top:0px;background:rgba(255,255,255,.8);z-index: 22;}

只要在class加loading就可以,用完之后removeclass(loading)

发表评论

电子邮件地址不会被公开。 必填项已用*标注