A Pen by Zakariae Laachir on CodePen.
Created
June 9, 2019 17:29
-
-
Save Nemra1/de97635ce9384ff40b9325801ef28411 to your computer and use it in GitHub Desktop.
vertical timeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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