添加在HTML页面
<script type="text/javascript" src="jquery.min.js"></script> <script type="text/javascript" src="jquery.flipcountdown.js"></script> <link rel="stylesheet" type="text/css" href="jquery.flipcountdown.css" />
添加div元素
<div id="flipcountdownbox1"></div>
和init flipcountdown
$(function(){ $('#flipcountdownbox1').flipcountdown(); })
- 尺寸(使用自举尺寸符号)
$("#flipcountdownbox1").flipcountdown({ size:"lg" });
lg-large大 md-middle中, default默认 sm-smallSM小 xs-Extra small 超小型
- 隐藏秒或分钟或小时
$("#flipcountdownbox1").flipcountdown({ showHour:false, showMinute:false, showSecond:true });
偏移时区
$("#flipcountdownbox3").flipcountdown({ tzoneOffset:3, showSecond:false });
- 12小时格式
$("#flipcountdownbox4").flipcountdown({am:true});
我的怎么出不来啊
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <link rel="stylesheet" type="text/css" href="jquery.flipcountdown.css" /> <title>index</title> </head> <body> <div id="flipcountdownbox1"></div> </body> <script type="text/javascript"> window.onload = function() { $('#flipcountdownbox1').flipcountdown(); } </script> </html>