1. Стилі для таймлайну (хронології подій)
.timeline - Основний контейнер для хронологічної шкали.
.timeline {
margin: 40px 0;
padding: 25px;
border-left: 4px solid #0057b7;
background-color: #ffffff;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 87, 183, 0.1);
position: relative;
}
.timeline:before {
content: "";
position: absolute;
top: 0;
left: -4px;
height: 100%;
width: 4px;
background: linear-gradient(to bottom, #0057b7, #00a1ff);
border-radius: 4px;
}
Використовується для оформлення біографічного розділу з хронологією подій.
Приклад використання:
<div class="timeline">
<div class="timeline-item">
<span class="date">1935</span>
<h3>Народився</h3>
<p>8 січня в селі Біївці на Черкащині</p>
</div>
</div>
.timeline-item - Окрема подія у хронології.
.timeline-item {
margin-bottom: 30px;
position: relative;
padding: 20px;
background-color: #f8faff;
border-radius: 6px;
transition: all 0.3s ease;
border: 1px solid #e0e9ff;
}
.timeline-item:hover {
transform: translateX(5px);
box-shadow: 2px 5px 10px rgba(0, 87, 183, 0.1);
background-color: #fff;
}
.timeline-item:before {
content: "";
position: absolute;
left: -32px;
top: 24px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #0057b7;
border: 3px solid #ffffff;
box-shadow: 0 0 0 2px #0057b7;
transition: all 0.3s ease;
}
.timeline-item:hover:before {
background: #00a1ff;
box-shadow: 0 0 0 2px #00a1ff;
transform: scale(1.2);
}
.timeline-item:last-child {
margin-bottom: 0;
}
.timeline-item h3 {
color: #0057b7;
margin-top: 0;
margin-bottom: 10px;
}
.timeline-item p {
color: #4a5568;
margin: 0;
line-height: 1.6;
}
.timeline-item .date {
display: inline-block;
padding: 3px 8px;
background-color: #e0e9ff;
color: #0057b7;
border-radius: 12px;
font-size: 0.85em;
margin-bottom: 10px;
}