Responsive time-line Vertical Design using simple pure css

Today we will see how to create responsive timeline vertical design using simple css code. This design helps the user to view the post or particular information for that particular time. It is user friendly and easily understand the timeline contents. Here is the example contains the code you can download and use this code. Click the demo link below to visit the result for this example i hope this post is very useful.



Code for Responsive Vertical-Timeline Design:

<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Responsive Vertical Timeline</title>
<link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Droid+Sans'>
<style>
body {
background-color: #FF9C07;
min-height: 100vh;
margin: 0;
font-family: 'Droid Sans', sans-serif;
}
body:before {
content: '';
position: fixed;
top: 0px;
left: 50%;
bottom: 0px;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
width: 4px;
background-color: #fff;
}
body .entries {
width: calc(100% - 80px);
max-width: 800px;
margin: auto;
position: relative;
left: -5px;
}
body .entries .entry {
width: calc(50% - 80px);
float: left;
padding: 20px;
clear: both;
text-align: right;
}
body .entries .entry:not(:first-child) {
margin-top: -60px;
}
body .entries .entry .title {
font-size: 32px;
margin-bottom: 12px;
position: relative;
color: #fff;
}
body .entries .entry .title:before {
content: '';
position: absolute;
width: 8px;
height: 8px;
border: 4px solid #ffffff;
background-color: #FF9C07;
border-radius: 100%;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
right: -73px;
z-index: 1000;
}
body .entries .entry .title.big:before {
width: 24px;
height: 24px;
-webkit-transform: translate(8px, -50%);
transform: translate(8px, -50%);
}
body .entries .entry .body {
color: #ffffff;
}
body .entries .entry .body p {
line-height: 1.4em;
}
body .entries .entry:nth-child(2n) {
text-align: left;
float: right;
}
body .entries .entry:nth-child(2n) .title:before {
left: -63px;
}
body .entries .entry:nth-child(2n) .title.big:before {
-webkit-transform: translate(-8px, -50%);
transform: translate(-8px, -50%);
}

</style>
</head>
<body>
<div class="entries">
<div class="entry">
<div class="title">2011</div>
<div class="body">
<p>How to create time line vertical design.</p>
</div>
</div>
<div class="entry">
<div class="title">2012</div>
<div class="body">
<p>time-line Vertical Design</p>
</div>
</div>
<div class="entry">
<div class="title big">2013</div>
<div class="body">
<p>How to time line pure css</p>
</div>
</div>
<div class="entry">
<div class="title">2014</div>
<div class="body">
<p>time line pure css - vertical design</p>
</div>
</div>
<div class="entry">
<div class="title">2015</div>
<div class="body">
<p>VAdipisci totam omnis cum et suscipit excepturi et excepturi. Inventore sequi sit ut aliquid. Modi aut dolores dignissimos.</p>
<p>Delectus facere officia consequuntur molestias deserunt illo. Placeat laudantium beatae natus excepturi ab nihil voluptates.</p>
</div>
</div>
<div class="entry">
<div class="title big">2016</div>
<div class="body">
<p>Impedit dolorem commodi explicabo fugit aut alias voluptatem. Magnam earum rerum quae dicta quibusdam aliquam ut.</p>
</div>
</div>
<div class="entry">
<div class="title">2017</div>
<div class="body">
<p>Responsive  time-line Vertical Design using simple pure css</p>
</div>
</div>
</div>
</body>
</html>

Post a Comment

0 Comments