css实现垂直自适应时间轴大事记代码

代码语言:html

所属分类:布局界面

代码描述:css实现垂直自适应时间轴大事记代码

代码标签: css垂直 自适应 时间轴 大事记 代码

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

<html lang="en">

<head>
    <meta charset="UTF-8">
    <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css">
    <style>
        @import url("https://fonts.googleapis.com/css?family=Open+Sans");
	@import url("https://fonts.googleapis.com/css?family=Oswald");
	html {
	box-sizing:border-box
}
*,*:before,*:after {
	box-sizing:inherit
}
body {
	background-color:#444;
	font-family:"Open Sans","Lucida Grande",Tahoma,Verdana,Arial,sans-serif;
	font-size:.875em;
	color:#212121;
	line-height:1.5
}
.wrapper {
	margin:3.125em auto;
	padding:1em 5em 1em;
	max-width:1000px
}
h1 {
	color:white;
	font-family:"Open Sans","Lucida Grande",Tahoma,Verdana,Arial,sans-serif;
	text-align:center
}
.timeline {
	line-height:1.5em;
	font-size:14px;
	transition:all .4s ease;
	position:relative;
	counter-reset:section
}
.timeline:before {
	content:"";
	width:10px;
	height:100%;
	background:#87ceeb;
	position:absolute;
	top:0;
	left:-3.313em;
	border-radius:40px 40px
}
.timeline--entry {
	position:relative;
	background-color:#eee
}
.timeline--entry__title {
	color:white;
	background-color:#ec407a;
	font-family:"Oswald",Georgia,Cambria,"Times New Roman",Times,serif;
	font-weight:300;
	font-size:1rem;
	padding:1em
}
.timeline--entry__title:before {
	content:"";
	display:inline-block;
	width:1em;
	height:1em;
	position:absolute;
	border-top:10px solid transparent;
	border-bottom:10px solid transparent;
	left:-1em;
	border-right:10px solid #ec407a
}
.timeline--entry__detail {
	background-color:#ddd;
	padding:1em;
	margin:0
}
.timeline--entry:before {
	content:"";
	font-family:"Oswald",Georgia,Cambria,"Times New Roman",Times,serif;
	color:#fff;
	display:flex;
	align-items:center;
	justify-content:center;
	width:3em;
	height:3em;
	background-color:#87ceeb;
	border:.2em solid white;
	border-radius:50%;
	position:absolute;
	counter-increment:section;
	content:counter(section);
	text-shadow:0 1px 0 #424242;
	left:-4.5em
}
@supports(display:grid) {
	@media(min-width:768px) {
	.timeline {
	display:grid;
	grid-gap:4.75em;
	grid-template-areas:".  entry1" "entry2  ." ". entry3" "entry4 ." ". entry5"
}
.timeline:before {
	left:49.5%
}
.timeline--entry:nth-child(1) {
	grid-area:entry1
}
.timeline--entry:nth-child(2.........完整代码请登录后点击上方下载按钮下载查看

网友评论0