initial commit
This commit is contained in:
49
index.html
Normal file
49
index.html
Normal file
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-Hans">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>时间轴</title>
|
||||
<link rel="stylesheet" href="css/timeline.css">
|
||||
<script src="//cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="js/timeline.js"></script>
|
||||
<style>
|
||||
.timeline-container{
|
||||
background: darkolivegreen;
|
||||
padding-top: 30px;
|
||||
}
|
||||
|
||||
.timeline{
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="timeline-container">
|
||||
<div class="timeline" id="timeline"></div>
|
||||
</div>
|
||||
<script>
|
||||
/**
|
||||
* 初始化中间时间轴
|
||||
*/
|
||||
function initTimeline() {
|
||||
$('#timeline').timeline({
|
||||
minScale: 'minute',//时间轴最小刻度minute 或者 hour
|
||||
autoPlayDuration: 300,//自动播放时间间隔
|
||||
animationDuration: 300,//自动播放时间间隔
|
||||
startHour: '1',//开始小时
|
||||
endHour: '23',//结束小时
|
||||
loadData: function (time) {
|
||||
//时间改变后加载数据(自动播放不触发)
|
||||
console.log('load data at %s',time)
|
||||
},
|
||||
autoPlayLoadData: function (time) {
|
||||
//自动播放时加载数据
|
||||
console.log('auto load data at %s',time)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
initTimeline();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user