web299.com
全部
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
首页
教育
语言/资格考试
法律
互联网
政务民生
Word模板
Excel模板
PPT模板
网页特效
小程序模板
网站模板
当前位置:
首页
>
网页特效
>
时间轴
响应式水平时间轴设计代码
分类:
时间轴
日期:
2024-05-14
点击(1)
评论(0)
演 示
免费下载
简介
在页面中引入bootstrap和font-awesome字体图标文件。 ```html
``` ##### HTML结构 该水平时间轴基本的HTML结构如下: ```html
2012
Web Desginer
......
2013
Web Developer
......
......
``` ##### CSS样式 为该水平时间轴添加下面的CSS样式。 ```html .main-timeline{ overflow: auto; } .main-timeline .timeline{ padding: 0; text-align: center; overflow: hidden; } .main-timeline .timeline-icon{ padding-bottom: 20px; margin-bottom: 30px; font-size: 65px; color: #727cb6; border-bottom: 3px solid #ccc; position: relative; } .main-timeline .timeline-icon:before{ content: ""; width: 16px; height: 16px; border-radius: 50%; background: #727cb6; margin: 0 auto; position: absolute; bottom: -9.5px; left: 0; right: 0; } .main-timeline .year{ display: block; width: 100%; height: 100px; line-height: 100px; border-radius: 50%; background: #727cb6; font-size: 30px; color: #fff; margin-bottom: 30px; z-index: 1; position: relative; } .main-timeline .year:before{ content: ""; display: block; width: 70px; height: 80%; background: #fff; border-radius: 50%; position: absolute; top: 10px; left: -37px; } .main-timeline .timeline-content{ padding: 0 10px; } .main-timeline .post{ font-size: 20px; color: #727cb6; margin: 0 0 20px 0; } .main-timeline .description{ font-size: 14px; color: #555; text-align: left; } .main-timeline .timeline:nth-child(2n) .timeline-icon, .main-timeline .timeline:nth-child(2n) .post{ color: #008b8b; } .main-timeline .timeline:nth-child(2n) .year, .main-timeline .timeline:nth-child(2n) .timeline-icon:before{ background: #008b8b; } .main-timeline .timeline:nth-child(3n) .timeline-icon, .main-timeline .timeline:nth-child(3n) .post{ color: #e77e21; } .main-timeline .timeline:nth-child(3n) .year, .main-timeline .timeline:nth-child(3n) .timeline-icon:before{ background: #e77e21; } .main-timeline .timeline:nth-child(4n) .timeline-icon, .main-timeline .timeline:nth-child(4n) .post{ color: #3498db; } .main-timeline .timeline:nth-child(4n) .year, .main-timeline .timeline:nth-child(4n) .timeline-icon:before{ background: #3498db; } .main-timeline .timeline:nth-child(5n) .timeline-icon, .main-timeline .timeline:nth-child(5n) .post{ color: #cca872; } .main-timeline .timeline:nth-child(5n) .year, .main-timeline .timeline:nth-child(5n) .timeline-icon:before{ background: #cca872; } .main-timeline .timeline:nth-child(6n) .timeline-icon, .main-timeline .timeline:nth-child(6n) .post{ color: #ed687c; } .main-timeline .timeline:nth-child(6n) .year, .main-timeline .timeline:nth-child(6n) .timeline-icon:before{ background: #ed687c; } ```
相关推荐
html5浪漫粒子表白文字特效
SlidesJS幻灯片特效
html5瀑布流相册特效
css3 svg实现的情人节表白鲜花动画特效
t-scroll.js基于ES6的DOM元素,过渡动画库插件
纯js写省市区三级联动效果
广告
广告