How to Create Fancy Timeline Design Using Html css
In this blogpost i'm design a Fancy Timeline Design Using Html css.
HTML :
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="main-timeline">
<div class="timeline">
<a href="#" class="timeline-content">
<div class="timeline-count">01</div>
<div class="timeline-icon"><i class="fa fa-globe"></i></div>
<h3 class="title">Web Designing</h3>
<p class="description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer males uada tellus lorem, et condimentum neque commodo Integer males uada tellus lorem, et condimentum neque commodo
</p>
</a>
</div>
<div class="timeline">
<a href="#" class="timeline-content">
<div class="timeline-count">02</div>
<div class="timeline-icon"><i class="fa fa-rocket"></i></div>
<h3 class="title">Web Development</h3>
<p class="description">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer males uada tellus lorem, et condimentum neque commodo Integer males uada tellus lorem, et condimentum neque commodo
</p>
</a>
</div>
</div>
</div>
</div>
</div>
CSS :
:root {
--color1: #FF9509;
--color2: #ffaf36;
}
.demo {
background-color: #eee;
}
.main-timeline {
font-family: 'Poppins', sans-serif;
}
.main-timeline:after {
content: '';
display: block;
clear: both;
}
.main-timeline .timeline {
width: calc(50% + 40px);
padding: 20px 0 0;
float: left;
}
.main-timeline .timeline-content {
background: linear-gradient(to right, var(--color1), var(--color2));
text-align: center;
padding: 0 85px 35px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.2);
border-radius: 50px;
display: block;
position: relative;
z-index: 1;
}
.main-timeline .timeline-content:hover {
text-decoration: none;
}
.main-timeline .timeline-content:before {
content: '';
background-color: #fff;
border-radius: 50px;
box-shadow: 0 0 20px -3px rgba(0, 0, 0, 0.4);
position: absolute;
left: 70px;
top: -20px;
bottom: 20px;
right: 70px;
z-index: -1;
}
.main-timeline .timeline-count {
color: #fff;
font-size: 35px;
font-weight: 700;
text-transform: uppercase;
transform: translateY(-50%);
position: absolute;
top: 50%;
left: 15px;
}
.main-timeline .timeline-icon {
color: #fff;
font-size: 35px;
font-weight: 700;
text-transform: uppercase;
transform: translateY(-50%);
position: absolute;
top: 50%;
right: 20px;
}
.main-timeline .title {
color: var(--color1);
font-size: 20px;
font-weight: 600;
letter-spacing: 1px;
text-transform: capitalize;
margin: 0 0 10px 0;
}
.main-timeline .description {
color: #555;
font-size: 13px;
letter-spacing: 1px;
margin: 0;
}
.main-timeline .timeline:nth-child(even) {
float: right;
margin: 0 0 0 10px;
}
.main-timeline .timeline:nth-child(even) .timeline-count {
left: auto;
right: 15px;
}
.main-timeline .timeline:nth-child(even) .timeline-icon {
right: auto;
left: 20px;
}
.main-timeline .timeline:nth-child(2) {
--color1: #FF4603;
--color2: #FF8000;
}
.main-timeline .timeline:nth-child(3) {
--color1: #E6094E;
--color2: #FF5792;
}
.main-timeline .timeline:nth-child(4) {
--color1: #0BB0F2;
--color2: #5CD8FA;
}
@media screen and (max-width:767px) {
.main-timeline .timeline,
.main-timeline .timeline:nth-child(even) {
width: 100%;
margin: 0 0 30px;
}
}
@media screen and (max-width:576px) {
.main-timeline .timeline,
.main-timeline .timeline:nth-child(even) {
padding: 0 15px;
}
.main-timeline .timeline-content {
padding: 75px 15px;
}
.main-timeline .timeline-content:before {
top: 60px;
bottom: 60px;
left: -15px;
right: -15px;
}
.main-timeline .timeline-icon,
.main-timeline .timeline:nth-child(even) .timeline-icon {
transform: translateX(-50%) translateY(0);
top: auto;
bottom: 4px;
left: 50%;
right: auto;
}
.main-timeline .timeline-count,
.main-timeline .timeline:nth-child(even) .timeline-count {
transform: translateX(-50%) translateY(0);
top: auto;
top: 6px;
left: 50%;
right: auto;
}
}
0 Comments