spin.js是一款基于jQuery的Loading动画插件,和之前分享的CSS3Loading动画应用不同的是,这款Loading动画是基于jQuery的,意味着兼容性更好;
spin添加引用:
<!--bootstrap-4.1.3-->
<linkrel="stylesheet"href="/Content/new_wechat/dist/bootstrap-4.1.3/css/bootstrap.min.css"/>
<!--jQuery2.2.3-->
<scriptsrc="/Content/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js"></script>
<!--/bootstrap-4.1.3-->
<scriptsrc="/Content/new_wechat/dist/bootstrap-4.1.3/js/bootstrap.min.js"></script>
<!--layer-->
<scriptsrc="/Content/layer/layer.js"></script>
<!--spin添加js引用-->
<scriptsrc="/Content/new_wechat/dist/spin-2.3.2/spin.js"></script>
spiner的父容器:
<!--bootstrap的model框-->
<divid="spin-loading"class="modal"data-keyboard="false"data-backdrop="static">
<divclass="modal-dialog"style="height:80%;"></div>
</div>
spiner初始化参数:
//opts可从网站在线制作
varspin_opts={
lines:10,//花瓣数目
length:0,//花瓣长度
width:20,//花瓣宽度
radius:40,//花瓣距中心半径
scale:0.75,
corners:1,//花瓣圆滑度(0-1)
opacity:0,
总之,spin.js给大家了,希望大家参考。