Skip to content

Instantly share code, notes, and snippets.

@Nemra1
Created June 9, 2019 17:29
Show Gist options
  • Save Nemra1/de97635ce9384ff40b9325801ef28411 to your computer and use it in GitHub Desktop.
Save Nemra1/de97635ce9384ff40b9325801ef28411 to your computer and use it in GitHub Desktop.
vertical timeline
<div class="container-fluid">
<div class="row">
<div class="col-10 offset-1">
<div class="timeline">
<div data-date="20/7/2015" class="timeline-row">
<h3>What is Lorem Ipsum?</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum veniam accusamus praesentium beatae. Reprehenderit ad magni ratione earum perferendis accusantium nihil consectetur quis praesentium, accusamus obcaecati sint quo voluptatem mollitia.</p>
</div>
<div data-date="1/5/2016" class="timeline-row">
<h3>What is Lorem Ipsum?</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum veniam accusamus praesentium beatae. Reprehenderit ad magni ratione earum perferendis accusantium nihil consectetur quis praesentium, accusamus obcaecati sint quo voluptatem mollitia.</p>
</div>
<div data-date="15/12/2017" class="timeline-row">
<h3>What is Lorem Ipsum?</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Cum veniam accusamus praesentium beatae. Reprehenderit ad magni ratione earum perferendis accusantium nihil consectetur quis praesentium, accusamus obcaecati sint quo voluptatem mollitia.</p>
</div>
</div>
</div>
</div>
</div>
@import url('https://fonts.googleapis.com/css?family=Montserrat:300');
*{
box-sizing: border-box;
font-family: 'Montserrat', sans-serif;
}
body{
margin: 0;
padding: 0;
background: #262626;
}
.timeline{
position: relative;
width: 100%;
min-height: 350px;
background: #363636;
padding: 5px 0px 5px 20px;
}
.timeline::before{
content: "";
position: absolute;
top: 0;
left: 15px;
width: 2px;
height: 100%;
background: #fff;
}
.timeline-row{
position: relative;
padding: 5px 15px;
}
.timeline-row::before{
content: attr(data-date);
display: block;
width: 110px;
height: 30px;
line-height: 30px;
text-align: center;
background: pink;
border-radius: 20px;
margin-bottom: 10px;
}
.timeline-row::after{
content: "";
position: absolute;
top: 12px;
left: -11px;
width: 15px;
height: 15px;
background: #fff;
border-radius: 50%;
}
.timeline h3{
font-size: 1.3rem;
color: #eee;
}
.timeline p{
font-size: .9rem;
color: #eee;
line-height: 1.5rem;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment