炫酷CSS3垂直时间轴特效
<!DOCTYPE html>
<html lang="en"> <head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<title>Document</title>
<style>
.main-timeline {
overflow: hidden;
position: relative;
} .main-timeline .timeline {
position: relative;
margin-top: -79px;
} .main-timeline .timeline:first-child {
margin-top: 0;
} .main-timeline .timeline:before,
.main-timeline .timeline:after {
content: "";
display: block;
width: 100%;
clear: both;
} .main-timeline .timeline:before {
content: "";
width: 100%;
height: 100%;
box-shadow: -8px 0 5px -5px rgba(0, 0, 0, 0.5) inset;
position: absolute;
top: 0;
right: 0;
z-index: 2;
} .main-timeline .timeline-icon {
width: 210px;
height: 210px;
border-radius: 50%;
border: 25px solid transparent;
border-top-color: #f44556;
border-right-color: #f44556;
margin: auto;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 1;
transform: rotate(45deg);
} .main-timeline .year {
display: block;
width: 110px;
height: 110px;
line-height: 110px;
border-radius: 50%;
background: #fff;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
margin: auto;
font-size: 30px;
font-weight: bold;
color: #f44556;
text-align: center;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
transform: rotate(-45deg);
} .main-timeline .timeline-content {
width: 35%;
float: right;
background: #f44556;
padding: 30px 20px;
margin: 50px 0;
z-index: 1;
position: relative;
} .main-timeline .timeline-content:before {
content: "";
width: 20%;
height: 15px;
background: #f44556;
position: absolute;
top: 50%;
left: -20%;
z-index: -1;
transform: translateY(-50%);
} .main-timeline .title {
font-size: 20px;
font-weight: bold;
color: #fff;
margin: 0 0 10px 0;
} .main-timeline .description {
font-size: 16px;
color: #fff;
line-height: 24px;
margin: 0;
} .main-timeline .timeline:nth-child(2n):before {
box-shadow: 8px 0 5px -5px rgba(0, 0, 0, 0.5) inset;
} .main-timeline .timeline:nth-child(2n) .timeline-icon {
transform: rotate(-135deg);
} .main-timeline .timeline:nth-child(2n) .year {
transform: rotate(135deg);
} .main-timeline .timeline:nth-child(2n) .timeline-content {
float: left;
} .main-timeline .timeline:nth-child(2n) .timeline-content:before {
left: auto;
right: -20%;
} .main-timeline .timeline:nth-child(2n) .timeline-icon {
border-top-color: #e97e2e;
border-right-color: #e97e2e;
} .main-timeline .timeline:nth-child(2n) .year {
color: #e97e2e;
} .main-timeline .timeline:nth-child(2n) .timeline-content,
.main-timeline .timeline:nth-child(2n) .timeline-content:before {
background: #e97e2e;
} .main-timeline .timeline:nth-child(3n) .timeline-icon {
border-top-color: #13afae;
border-right-color: #13afae;
} .main-timeline .timeline:nth-child(3n) .year {
color: #13afae;
} .main-timeline .timeline:nth-child(3n) .timeline-content,
.main-timeline .timeline:nth-child(3n) .timeline-content:before {
background: #13afae;
} .main-timeline .timeline:nth-child(4n) .timeline-icon {
border-top-color: #105572;
border-right-color: #105572;
} .main-timeline .timeline:nth-child(4n) .year {
color: #105572;
} .main-timeline .timeline:nth-child(4n) .timeline-content,
.main-timeline .timeline:nth-child(4n) .timeline-content:before {
background: #105572;
} @media only screen and (max-width: 1199px) {
.main-timeline .timeline {
margin-top: -103px;
} .main-timeline .timeline-content:before {
left: -18%;
} .main-timeline .timeline:nth-child(2n) .timeline-content:before {
right: -18%;
}
} @media only screen and (max-width: 990px) {
.main-timeline .timeline {
margin-top: -127px;
} .main-timeline .timeline-content:before {
left: -2%;
} .main-timeline .timeline:nth-child(2n) .timeline-content:before {
right: -2%;
}
} @media only screen and (max-width: 767px) {
.main-timeline .timeline {
margin-top: 0;
overflow: hidden;
} .main-timeline .timeline:before,
.main-timeline .timeline:nth-child(2n):before {
box-shadow: none;
} .main-timeline .timeline-icon,
.main-timeline .timeline:nth-child(2n) .timeline-icon {
margin-top: -30px;
margin-bottom: 20px;
position: relative;
transform: rotate(135deg);
} .main-timeline .year,
.main-timeline .timeline:nth-child(2n) .year {
transform: rotate(-135deg);
} .main-timeline .timeline-content,
.main-timeline .timeline:nth-child(2n) .timeline-content {
width: 100%;
float: none;
border-radius: 0 0 20px 20px;
text-align: center;
padding: 25px 20px;
margin: 0 auto;
} .main-timeline .timeline-content:before,
.main-timeline .timeline:nth-child(2n) .timeline-content:before {
width: 15px;
height: 25px;
position: absolute;
top: -22px;
left: 50%;
z-index: -1;
transform: translate(-50%, 0);
}
}
</style>
</head> <body>
<div class="demo">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="main-timeline">
<div class="timeline">
<div class="timeline-icon"><span class="year">2018</span></div>
<div class="timeline-content">
<h3 class="title">Web Desginer</h3>
<p class="description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lacinia mi ultrices,
luctus nunc ut, commodo enim. Vivamus sem erat.
</p>
</div>
</div>
<div class="timeline">
<div class="timeline-icon"><span class="year">2017</span></div>
<div class="timeline-content">
<h3 class="title">Web Developer</h3>
<p class="description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lacinia mi ultrices,
luctus nunc ut, commodo enim. Vivamus sem erat.
</p>
</div>
</div>
<div class="timeline">
<div class="timeline-icon"><span class="year">2016</span></div>
<div class="timeline-content">
<h3 class="title">Web Desginer</h3>
<p class="description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lacinia mi ultrices,
luctus nunc ut, commodo enim. Vivamus sem erat.
</p>
</div>
</div>
<div class="timeline">
<div class="timeline-icon"><span class="year">2015</span></div>
<div class="timeline-content">
<h3 class="title">Web Developer</h3>
<p class="description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec lacinia mi ultrices,
luctus nunc ut, commodo enim. Vivamus sem erat.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body> </html>
效果:移动和PC端



内容来源于链接https://www.toutiao.com/i6738373341314286088/
炫酷CSS3垂直时间轴特效的更多相关文章
- HTML5+CSS3实现的响应式垂直时间轴
<!DOCTYPE HTML><html><head><meta charset="utf-8"><meta name=&qu ...
- Jquery实现超酷的时间轴特效
Timeline时间轴Jquery特效是一款现在互联网上非常流行的一种布局结构,结合了瀑布流布局,最近很多网友问到这种特效,网站上有网友们分享过一款,功能虽然实现,但样式不太好看,今天就把它整理出来分 ...
- 10大炫酷的HTML5文字动画特效欣赏
文字是网页中最基本的元素,在CSS2.0时代,我们只能在网页上展示静态的文字,只能改变他的大小和颜色,显得枯燥无味.随着HTML5的发展,现在网页中的文字样式变得越来越丰富了,甚至出现了文字动画,HT ...
- html5跟随鼠标炫酷网站引导页动画特效
html5跟随鼠标炫酷网站引导页动画特效一款非常不错的引导页,文字效果渐变,鼠标跟随出绚丽的条纹.html5炫酷网站引导页,鼠标跟随出特效. 体验效果:http://hovertree.com/tex ...
- CSS3实现时间轴效果
原文:CSS3实现时间轴效果 最近打开电脑就能看到极客学院什么新用户vip免费一个月,就进去看看咯,这里就不说它的课程怎么滴了,里面实战路径图页面看到了这个效果: 有点像时间轴的赶脚,而且每一块鼠标悬 ...
- 基于jQuery发展历程时间轴特效代码
分享一款基于jQuery发展历程时间轴特效代码,带左右箭头,数字时间轴选项卡切换特效下载.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div id="time ...
- 发展简史jQuery时间轴特效
发展简史jQuery时间轴特效.这是一款鼠标滚动到一定的高度动画显示企业发展时间轴特效.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div class="wr ...
- 基于jQuery和CSS3炫酷图片3D旋转幻灯片特效
在线预览 源码下载 iPresenter是一款效果非常炫酷的jQuery和CSS3 3D旋转幻灯片特效插件.你可以使用它来制作产品展示.图片画廊或者各种幻灯片和轮播图特效.这款幻灯片插件的特点有: ...
- 基于HTML5 SVG和CSS3炫酷蹦床式图片切换特效
今天给大家分享一款效果非常炫酷的HTML5 SVG和CSS3蹦床式图片切换特效插件.该图片切换插件在进行图片切换时,整个屏幕就像一张大蹦床一样,将图片弹射出去,切换到另一张图片,效果非常有创意.效果图 ...
随机推荐
- 查找担保圈-step5-比较各组之间的成员,对组的包含性进行查询,具体见程序的注释-版本2
USE [test] GO /****** Object: StoredProcedure [dbo].[p03_get_groupno_e2] Script Date: 2019/7/8 15:01 ...
- shell 字符
Shell 中的符号: 在shell中有很多符号代表了一些意思,重点说说 键盘上的符号在shell中的意义. 通配符: ~ 匹配家目录 ? 匹配单个字符.( ?之匹配单一的一个字符.x11 这种的就 ...
- HDU - 1045 Fire Net (二分图最大匹配-匈牙利算法)
(点击此处查看原题) 匈牙利算法简介 个人认为这个算法是一种贪心+暴力的算法,对于二分图的两部X和Y,记x为X部一点,y为Y部一点,我们枚举X的每个点x,如果Y部存在匹配的点y并且y没有被其他的x匹配 ...
- Git 入门:概念、原理、使用
出处: git入门:概念.原理.使用 git和Github 概念 Git --- 版本控制工具(命令). git是一个开源的分布式版本控制系统,用以有效.高速的处理从很小到非常大的项目版本管理.git ...
- oracle建表详细信息
一张用户表 -- Create table create table OA_DM.DM_GY_USER ( ), username ) not null, loginname ) not null, ...
- LinqToSQL2
扩展方法: 扩展方法是C#3.0的新特性,可以通过为已知类型添加新方法来到到扩展类型的目的,同时不需对此类型做任何改动. 重点记住的是,定义为静态方法的扩展方法只能在通过using指令显示地将名称空间 ...
- 【html】 iframe 和 frameset 的区别
一.两者的相同点和不同点 相同点: iframe 和frameset都是html布局的框架布局 不同点: iframe是一个内联框架,是在页面里生成内部框架 frameset定义一个框架集,包含多个子 ...
- NSIS MUI 的内置向导页面
MUI 的内置向导页面和安装程序有关的向导页面MUI_PAGE_WELCOME 该向导页面显示欢迎信息MUI_PAGE_LICENSE text/rtf_file 该向导页面显示软件授权申明MUI_P ...
- O047、 Cinder 组件详解
参考https://www.cnblogs.com/CloudMan6/p/5585637.html cinder-api cinder-api 是整个Cinder 组件的门户,所有cinde ...
- 前后端分离-模拟数据之RAP2快速入门
是啥? RAP是一个可视化接口管理工具 通过分析接口结构,动态生成模拟数据,校验真实接口正确性, 围绕接口定义,通过一系列自动化工具提升我们的协作效率.我们的口号:提高效率,回家吃晚饭! 可视化编辑, ...