码迷,mamicode.com
首页 > 其他好文 > 详细

Html5添加时尚的圆形进度条样式的倒计时插件教程

时间:2016-01-06 11:02:09      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:

一、使用方法
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/kinetic.js"></script>
<script type="text/javascript" src="js/jquery.final-countdown.js"></script>

二、Html结构
<div class="countdown countdown-container container">
<div class="clock row">
<div class="clock-item clock-days countdown-time-value col-sm-6 col-md-3">
<div class="wrap">
<div class="inner">
<div id="canvas-days" class="clock-canvas"></div>
<div class="text">
<p class="val">0</p>
<p class="type-days type-time">DAYS</p>
</div>
</div>
</div>
</div>
<div class="clock-item clock-hours countdown-time-value col-sm-6 col-md-3">
<div class="wrap">
<div class="inner">
<div id="canvas-hours" class="clock-canvas"></div>
<div class="text">
<p class="val">0</p>
<p class="type-hours type-time">HOURS</p>
</div>
</div>
</div>
</div>
<div class="clock-item clock-minutes countdown-time-value col-sm-6 col-md-3">
<div class="wrap">
<div class="inner">
<div id="canvas-minutes" class="clock-canvas"></div>
<div class="text">
<p class="val">0</p>
<p class="type-minutes type-time">MINUTES</p>
</div>
</div>
</div><
</div>
<div class="clock-item clock-seconds countdown-time-value col-sm-6 col-md-3">
<div class="wrap">
<div class="inner">
 <div id="canvas-seconds" class="clock-canvas"></div>
<div class="text">
<p class="val">0</p>
<p class="type-seconds type-time">SECONDS</p>
</div>
</div>
</div>
</div>
</div>
</div>

三、初始化插件
$(document).ready(function() {
$(’.countdown’).final_countdown({
’start’: 1362139200,
’end’: 1388461320,
’now’: 1387461319
}, function() {
// Finish Callback
 });
});    

四、配置参数
var defaults = $.extend({
start: undefined,
end: undefined,
now: undefined,
selectors: {
value_seconds: ’.clock-seconds .val’,
canvas_seconds: ’canvas-seconds’,
value_minutes: ’.clock-minutes .val’,
canvas_minutes: ’canvas-minutes’,
value_hours: ’.clock-hours .val’,
canvas_hours: ’canvas-hours’,
value_days: ’.clock-days .val’,
canvas_days: ’canvas-days’
},
seconds: {
borderColor: ’#7995D5’,
borderWidth: ’6’
},
minutes: {
borderColor: ’#ACC742’,
borderWidth: ’6’
},
hours: {
borderColor: ’#ECEFCB’,
 borderWidth: ’6’
},
days: {
borderColor: ’#FF9900’,
borderWidth: ’6’
}
}, options);  

五、DATA属性
<div class="countdown countdown-container container"
data-start="1362139200"
data-end="1388461320"
data-now="1387461319"
data-border-color="rgba(255, 255, 255, .8)">
REST OF HTML HERE
</div>   
 
KeyMob移动端广告平台是一个移动广告智能管理平台,其目的是为IOS,Android和Windows Phone 8开发者提供一个简单的一站式广告管理工具,并为开发者带来更高的广告收入。

Html5添加时尚的圆形进度条样式的倒计时插件教程

标签:

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
key
加入时间:2016-01-05
  关注此人  发短消息
文章分类
key”关注的人------(0
key”的粉丝们------(0
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!