我想实现赛车游戏每一局开始前三秒倒计时,百度了下都是游戏开始后的倒计时..请各位大神点拨下
var couBox=$('#countDown i');
var that=this;
couBox.text(3);
$('#countDown').css('display','block').children('span').animate({
transform:'scale(.2)',
opacity:.2
},1000,function () {
couBox.text(2)
}).animate({
transform:'scale(1)',
opacity:1
},1000).animate({
transform:'scale(.2)',
opacity:.2
},1000,function () {
couBox.text(1)
}).animate({
opacity:1,
transform:'scale(1)'
},1000).animate({
opacity:.2,
transform:'scale(.2)'
},1000,function () {
couBox.text('GO!')
}).animate({
opacity:1,
transform:'scale(1)'
},1000).animate({
opacity:0,
transform:'scale(0)'
},300,function () {
switcher(false,$(this).parents('#countDown'));
that.start();
});
Invoke 倒计时方法
具体问题是什么?