ajax页面载入动画,添加加载动画,jQuery的AJAX .load()

对于我知道必须采取超过几毫秒的时间的潜力,我用Spin.js它没有任何外部依赖,并且是跨浏览器兼容

var opts = {

lines: 13, // The number of lines to draw

length: 10, // The length of each line

width: 4, // The line thickness

radius: 11, // The radius of the inner circle

rotate: 0, // The rotation offset

color: '#000', // #rgb or #rrggbb

speed: 0.6, // Rounds per second

trail: 32, // Afterglow percentage

shadow: false, // Whether to render a shadow

hwaccel: false, // Whether to use hardware acceleration

className: 'spinner', // The CSS class to assign to the spinner

zIndex: 2e9, // The z-index (defaults to 2000000000)

top: 'auto', // Top position relative to parent in px

left: 'auto' // Left position relative to parent in px

};

var target, spinner;

$(function(){

target = $('#window').get(0);

spinner = new Spinner(opts);

spinner.spin(target);

setTimeout(function(){

spinner.stop();

$(target).html("Loading finished.");

}, 3500);

});

看到小提琴http://jsfiddle.net/y75Tp/73/(更新异步请求感谢verbumSapienti)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值