这个DEMO的时分秒背景是用css3写的。放在手机上浏览是个很不错的倒计时效果。
倒计时js代码<div> <br>
<div></div> <br>
<p></p> <br>
</div>
<br>
$(function() { <br>
var note = $('#note'); <br>
var ts = (new Date("2016-02-08")).getTime(); <br>
$('#countdown').countdown({ <br>
timestamp: ts, <br>
callback: function(days, hours, minutes, seconds) { <br>
<br>
var message = "距离2016新年还有"; <br>
<br>
message += days + "天" + (days == 1 ? '' : '') + ""; <br>
message += hours + "小时" + (hours == 1 ? '' : '') + ""; <br>
message += minutes + "分" + (minutes == 1 ? '' : '') + ""; <br>
message += seconds + "秒" + (seconds == 1 ? '' : '') + ""; <br>
message += "..."; <br>
note.html(message); <br>
} <br>
}); <br>
});
jQuery倒计时演示效果:http://www.sucaihuo.com/js/518.html
支持手机浏览的倒计时插件.zip ( 72.06 KB 下载:76 次 )
AD:真正免费,域名+虚机+企业邮箱=0元