一个基于vue的时间轴轮播图插件

简单Demo效果: 

引入: 

<script src="js/jquery.min.js"></script> <!-- >=1.11.2 -->
<script src="js/timeline.min.js"></script>

<link rel="stylesheet" href="css/timeline.css">

Html: 

<template>
    <div class="timeline-container timeline-theme-1">
      <div class="timeline js-timeline">
        <div data-time="2017" class="theme-2" >
          your content or markup
        </div>
        <div data-time="2016" class="theme-6">
          your content or markup
        </div>
        <div data-time="2015" class="theme-4">
          your content or markup
        </div>
        <div data-time="2014" class="theme-5">
          your content or markup
        </div>
        <div data-time="2013" class="theme-3">
          your content or markup
        </div>
      </div>
    </div>
</template>

<style>
.timeline-theme-1 {
  width: 600px;
  margin: 70px auto auto;
}

.timeline-theme-1 .timeline-list {
    width: 600px !important;
    height: 250px;
}

.js-timeline .box-item {
  float: left;
  width: 600px;
  height: 250px;
  color: #fff;
  text-align: center; }

.theme-1 {
  background: #4A2AB2; }

.theme-2 {
  background: #7dffc3; }

.theme-3 {
  background: #23A5E9; }

.theme-4 {
  background: #93C763; }

.theme-5 {
  background: #949923; }

.theme-6 {
  background: #990055; }
</style>

 JS:

$('.js-timeline').Timeline({
        autoplay: true,
        mode: 'vertical',
        itemClass: 'box-item'
})

github地址:https://github.com/ilkeryilmaz/timelinejs 

附:基于jquery 横向/纵向 时间轴插件推荐 

其他效果(可能会有闪屏Bug)

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值