css布局实现垂直时间轴大事记效果代码

代码语言:html

所属分类:布局界面

代码描述:css布局实现垂直时间轴大事记效果代码

代码标签: 垂直 时间 大事记 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh">
<head>
       
<meta charset="UTF-8">
       
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
       
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.3.3.4.css">
<style>
    body
, html { font-size: 100%;       padding: 0; margin: 0;}

/* Reset */
*,
*:after,
*:before {
       
-webkit-box-sizing: border-box;
       
-moz-box-sizing: border-box;
       
box-sizing: border-box;
}

/* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */
.clearfix:before,
.clearfix:after {
       
content: " ";
       
display: table;
}

.clearfix:after {
       
clear: both;
}

body
{
       
background: #bdd9f5;
       
color: #D5D6E2;
       
font-weight: 500;
       
font-size: 1.05em;
       
font-family: "Microsoft YaHei","Segoe UI", "Lucida Grande", Helvetica, Arial,sans-serif;
}
</style>
       
       
<style type="text/css">
                .demo{padding: 2em 0;}
                .main-timeline{
                    overflow: hidden;
                    position: relative;
                }
                .main-timeline:before{
                    content: "";
                    width: 7px;
                    height: 100%;
                    background: #909090;
                    position: absolute;
                    top: 0;
                    left: 50%;
                    transform: translateX(-50%);
                }
                .main-timeline .timeline{
                    width: 50%;
                    padding-left: 50px;
                    float: right;
                    position: relative;
                }
                .main-timeline .timeline:before{
                    content: "";
                    width: 30px;
                    height: 30px;
                    border-radius: 50%;
                    background: #909090;
                    border: 7px solid #fff;
                    position: absolute;
                    top: 50%;
                    left: -15p.........完整代码请登录后点击上方下载按钮下载查看

网友评论0