1. 需要先加载countdown插件对应的css文件,也就几行代码而已,可以不用引入,自己手写一样啦
Box-sizing: border-Box;
-moz-Box-sizing: border-Box;
-ms-Box-sizing: border-Box;
-o-Box-sizing: border-Box;
Box-sizing: border-Box;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
html,body {
font: 24px/1.5 'Microsoft YaHei',arial,tahoma,'\5b8b\4f53',sans-serif;
font-weight: 700;
background: #efefef;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}
countdown {
width: 60%;
margin: 20% auto;
color: #ff4d4d;
}
.countdown-day,.countdown-hour,.countdown-minute,.countdown-second {
display: inline-block;
margin: 0 .5rem;
background: #ff3f0f;
font-size: 2rem;
font-weight: 700;
color: #fff;
}
2.再加载js文件,在此之前得先引入jquery
<script type="text/javascript" src="js/jquery.countdown-1.0.0.min.js">