这是一款基于Bootstrap网格系统的响应式横向水平时间轴特效。该水平时间轴特效采用bootstrap网格进行布局,然后通过css代码来进行美化,效果简洁时尚。

使用方法

在页面中引入bootstrap文件。

HTML结构

该水平时间轴的HTML结构如下:

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

read more

2011

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

read more

2012

......

然后通过下面的CSS代码来对水平时间轴进行美化。

.main-timeline{ position: relative; }

.main-timeline:before,

.main-timeline:after{

content: "";

display: block;

width: 100%;

clear: both;

}

.main-timeline:before{

content: "";

width: 100%;

height: 5px;

background: #fff;

margin: auto 0;

position: absolute;

top: 50%;

left: 0;

}

.main-timeline .timeline{

width: 22%;

float: left;

margin-left: 3%;

position: relative;

}

.main-timeline .timeline:before{

content: attr(data-heading);

display: inline-block;

font-size: 24px;

font-weight: bold;

color: #fff;

transform: rotate(-90deg);

position: absolute;

top: 30px;

left: -2px;

z-index: 2;

}

.main-timeline .timeline:after{

content: "";

width: 5px;

height: 60px;

border-left: 9px dotted #fff;

position: absolute;

top: 54%;

left: 71px;

}

.main-timeline .timeline-content{

padding: 15px 0 40px 50px;

margin-bottom: 80px;

border-radius: 15px;

border: 5px solid #fff;

text-align: left;

background: #f67420;

z-index: 1;

position: relative;

}

.main-timeline .timeline:nth-child(even) .timeline-content{ background: #43a6ba; }

.main-timeline .timeline-content:before{

content: "";

width: 40px;

height: 100%;

position: absolute;

top: 0;

left: 0;

background: #d66215;

border-radius: 10px 0 0 10px;

}

.main-timeline .timeline:nth-child(even) .timeline-content:before{ background: #1784ab; }

.main-timeline .timeline-content:after{

content: "";

width: 40px;

height: 40px;

background: #f67420;

border-bottom: 5px solid #fff;

border-right: 5px solid #fff;

position: absolute;

bottom: -23px;

left: 50px;

transform: rotate(45deg);

z-index: -1;

}

.main-timeline .timeline:nth-child(even) .timeline-content:after{ background: #43a6ba; }

.main-timeline .description{

font-size: 14px;

color: #fff;

}

.main-timeline .read-more{

display: inline-block;

padding-right: 15px;

font-size: 16px;

font-weight: bold;

color: #fff;

text-transform: capitalize;

position: relative;

}

.main-timeline .read-more:before{

content: "\f0da";

font-family: 'FontAwesome';

font-size: 24px;

position: absolute;

top: -6px;

right: 0;

}

.main-timeline .year{

display: inline-block;

width: 85px;

height: 85px;

line-height: 85px;

background: #f67420;

border-radius: 5px;

border: 5px solid #fff;

text-align: center;

margin-left: 34px;

transform: rotate(45deg);

position: relative;

}

.main-timeline .timeline:nth-child(even) .year{ background: #43a6ba; }

.main-timeline .year span{

display: block;

font-size: 20px;

font-weight: bold;

color: #fff;

transform: rotate(-45deg);

}

.main-timeline .timeline.bottom{ margin: -7.7% 0 0 7%; }

.main-timeline .timeline.bottom:nth-child(5n+1),

.main-timeline .timeline.bottom:last-child{ margin-left: 3%; }

.main-timeline .timeline.bottom:before{

top: auto;

bottom: 110px;

}

.main-timeline .timeline.bottom:after{

top: auto;

left: auto;

bottom: 54%;

right: 71px;

border-color: #fff;

}

.main-timeline .timeline.bottom .timeline-content{

margin: 80px 0 0 0;

padding: 15px 0 40px 50px;

}

.main-timeline .timeline.bottom .timeline-content:after{

border: none;

border-top: 5px solid #fff;

border-left: 5px solid #fff;

bottom: auto;

top: -23px;

left: auto;

right: 50px;

}

.main-timeline .timeline.bottom .year{

top: 4px;

margin-left: 132px;

}

@media only screen and (max-width: 1199px){

.main-timeline:before{

width: 5px;

height: 100%;

top: 0;

left: 5%;

}

.main-timeline .timeline,

.main-timeline .timeline.bottom,

.main-timeline .timeline.bottom:nth-child(5n+1),

.main-timeline .timeline.bottom:last-child{

width: 85%;

float: none;

margin: 0 0 20px 15%;

}

.main-timeline .timeline:after,

.main-timeline .timeline.bottom:after{

width: 60px;

height: 5px;

top: 50px;

left: -58px;

border-top: 9px dotted #fff;

}

.main-timeline .timeline-content,

.main-timeline .timeline.bottom .timeline-content{ margin: 0; }

.main-timeline .year,

.main-timeline .timeline.bottom .year{

width: 65px;

height: 65px;

line-height: 60px;

margin: 0;

position: absolute;

top: 20px;

left: -15.5%;

z-index: 1;

}

.main-timeline .timeline .timeline-content:after{ display: none; }

.main-timeline .timeline.bottom:before{

bottom: auto;

top: 30px;

left: -2px;

}

}

@media only screen and (max-width: 990px){

.main-timeline .year,

.main-timeline .timeline.bottom .year{

left: -16.8%;

}

}

@media only screen and (max-width: 767px){

.main-timeline .timeline:after,

.main-timeline .timeline.bottom:after{ display: none; }

.main-timeline .year,

.main-timeline .timeline.bottom .year{

width: 30px;

height: 30px;

border: 3px solid #fff;

left: -13.5%;

}

.main-timeline .year span{ display: none; }

}

@media only screen and (max-width: 480px){

.main-timeline .year,

.main-timeline .timeline.bottom .year{ left: -15.5%; }

}

bootstrap 动态横向时间轴_简洁的横向水平时间轴特效相关推荐

  1. 熔断器熔断时间标准_正确认识熔断器的熔断时间

    熔断时间是熔断器的一个重要参数,它直接反映了熔断器的保护功能的强弱,但必须跟所负载的电流相对应,任何一个负载电流对应熔断时间的函数关系就形成了熔断器最重要的性能指标之一:熔断特性或安秒特性(I-t特性 ...

  2. python 指定时间递增_用python输出未来时间,递增

    #!/usr/bin/evn python # -*- coding: UTF-8 -*- # import time import datetime # # 输出的是时间戳 # print time ...

  3. java 时间轴_如何通过Java实现时间轴过程解析

    这篇文章主要介绍了如何通过Java实现时间轴过程解析,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友可以参考下 1.需要添加FastJson的依赖处理数据. c ...

  4. android 横向滑动日期_移动端横向滑动如何设计?

    所谓的"左右横滑"交互英文名叫做"Horizontal Scrolling Lists",最早可能起源于 Windows Phone 的横向内容滑动设计.用于在 ...

  5. python获取系统时间函数_简单记录python的时间函数操作

    1. time和datetime模块 import datetime,time 2. 获得当前时间 time.time() #获得当前时间,返回float型 time.localtime([float ...

  6. js php 获取时间倒计时_,js实现倒计时及时间对象

    JS实现倒计时效果代码如下: 无标题文档h #box { width: 100%; height: 400px; background: black; color: #fff; font-size:4 ...

  7. 熔断器熔断时间标准_一种熔断器熔断时间测试电路的制作方法

    本实用新型涉及汽车制造技术领域,尤其涉及一种熔断器熔断时间测试电路. 背景技术: 伴随着日新月异的科技进步,人们对生活质量的追求也越来越高,汽车已经成为人们日常出行必不可少的交通工具,人们对汽车的舒适 ...

  8. js 格式化 java时间格式化_用JavaScript(js)对时间格式化

    可以说是Web项目中不可或缺的一个Javascript类库,它可以帮助你快速的解决客户端编程的许多问题,下面贴出一个用js格式化时间的方法. Date.prototype.format=functio ...

  9. 黑苹果双系统时间不一致_黑苹果与Windows系统时间不对(不同步)的解决办法...

    唠叨 经过我一番蒸腾,终于把系统给上好了,目前还缺个WiFi,等着把网卡淘回来换上就可以完美支持WiFi,隔空投送,以及苹果的各个功能. 先上个电脑配置吧,我的是机械革命深海幽灵z2air-s.这是我 ...

  10. 华为手机如何调时间显示_华为手机如何设置时间没有显示

    大家好,我是时间财富网智能客服时间君,上述问题将由我为大家进行解答. 以华为p30为例,设置时间的方法是: 1.打开设置,下拉到最后点击系统. 2.选择日期和时间,将24小时制选项和自动设置打开,即可 ...

最新文章

  1. GPU上创建目标检测Pipeline管道
  2. Python链接Mssql之Python库pymssql
  3. 《jQuery与JavaScript入门经典》——2.6 小结
  4. WebForm服务器验证控件与前端js自定义验证共同使用
  5. HZOJ string
  6. docker容器的本地局域网yum源优化
  7. react学习(64)--简单的锚点封装
  8. python矩阵行数_python查看矩阵的行列号以及维数方式
  9. opentsdb basic install
  10. 成都Uber优步司机奖励政策(4月22日)
  11. 【[Violet]樱花】
  12. php 手动搭建环境
  13. JAVA中常见异常小结
  14. mysql 按日期查询
  15. Codeforces Round 253 (Div. 2)
  16. 捷联惯导系统(SINS)误差模型
  17. 11-ES2015基础语法
  18. Linux iio驱动学习
  19. 图像处理领域顶级期刊及会议
  20. 单片机方案设计红外人体测温仪方案

热门文章

  1. 【牛客网】马三来刷题之顺时针旋转矩阵
  2. 网络安全基础问答24例,白帽黑客必备
  3. 笔记本设置WiFi热点命令操作
  4. 4-20mA电流输出设计方案
  5. 大数据产品价值主张_大数据对商业模式创新的影响
  6. (附源码)node.js基于vue框架潮牌官网设计与实现 毕业设计 010955
  7. Visual Studio 番茄助手 安装问题
  8. 华东理工大学计算机网络作业,华东理工大学计算机网络实验操作手册.pdf
  9. 软考中级考试信息系统管理工程师怎么样??
  10. 软件测试女生可以学习么?现在还能入行么?