阅读:3347 次 编辑日期:2013-12-17
CSS: .wrap{ width:300px; height:20px; background:#CFF; color:#000; margin-top:50px; } .wrap2{ width:300px; height:20px; background:#CFF;color:#000; } .wrap3{ width:300px; height:200px; background:#ccc;color:#000; display:none; } .wrap4{ width:10px;height:10px; background: #F00;color:#000; position:absolute;top:0; left:0; } .tiao{width:2px; height:20px; background:#F00;}
HTML:
JS: $(document).ready(function(){ $("#a").animate({width:300},{duration:5000,step:function(uw3c){ var p=Math.round((uw3c/300)*100); $("#b").text(p+"%"); $("#c").css("margin-left",uw3c) if(p==100){ location.href="http://www.uw3c.com" } } }) })