1
Today
Jhon Smith
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
2
Yesterday
Jhon Smith
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
3
Feb 24, 2023
Jhon Smith
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
4
Feb 23, 2023
Jhon Smith
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
body{
font-family: 'Roboto', sans-serif;
font-size: 14px;
margin:15px;
}
.timeline-block {
width: 250px;
position: relative;
}
.timeline-block .timeline-header {
text-align: center;
background: #57b1e1;
color: #fff;
padding: 4px 0;
font-size: 13px;
position: relative;
display: flex;
justify-content: center;
align-items: center;
column-gap: 7px;
}
.timeline-block .timeline-header:after {
content: "";
position: absolute;
top: 0;
right: -29px;
border: 15px solid transparent;
border-left-color: #57b1e1;
height: 1px;
}
.timeline-block .timeline-header:before {
content: "";
border: 7px solid transparent;
border-top-color: #4c97bf;
border-right-color: #4c97bf;
position: absolute;
left: 0;
bottom: -12px;
}
.timeline-content {
padding: 0 10px;
}
.timeline-content div {
background: #ffffff;
width: 100%;
padding: 20px;
}
.timeline-content div h4 {
margin: 0;
border-bottom: 1px solid #e1e1e1;
padding-bottom: 7px;
color: #57b1e1;
}
.timeline-content div p {
font-size: 12px;
line-height: 18px;
margin-bottom: 0;
}
.timeline-block:nth-child(even) {
text-align: right;
margin-left: auto;
}
.timeline-block:nth-child(even) .timeline-header:after {
left: -28px;
right: auto;
border-right-color: #bd58ff;
border-left-color: transparent;
}
.timeline-block:nth-child(even) .timeline-header:before {
left: auto;
right: 0;
border-left-color: #aa51e4;
border-right-color: transparent;
border-top-color: #aa51e4;
}
.timeline-container {
width: 600px;
margin: 0 auto;
background: #eeeeee;
padding: 20px 10px;
position: relative;
}
.timeline-block:nth-child(even) .timeline-header {
background: #bd58ff;
}
.timeline-seprator {
background: #57b1e1;
width: 4px;
height: calc(100% - 20px);
position: absolute;
top: 10px;
left: calc(50% - 2px);
}
.timeline-block:nth-child(even) .timeline-content h4 {
color: #bd58ff;
}
span.timeline-num {
position: absolute;
width: 35px;
height: 35px;
background: #fff;
border: 3px solid #57b1e1;
border-radius: 50%;
text-align: center;
line-height: 32px;
right: -57px;
z-index: 10;
color: #57b1e1;
font-weight: 700;
}
.timeline-block:nth-child(even) span.timeline-num {
left: -58px;
right: auto;
border-color: #bd58ff;
color: #bd58ff;
}
.timeline-block .timeline-header img {
width: 22px;
}
console.log('CSS Timeline')