update timeline line filling animation

This commit is contained in:
unknown
2025-10-15 18:03:36 +05:30
parent 29f6820aba
commit fc17ad8e92
2 changed files with 4 additions and 4 deletions

View File

@@ -1254,13 +1254,13 @@ span.textaccor {
.line-fill {
position: absolute;
top: 50%;
left: 60px;
height: 2px;
left: 10px;
height: 1px;
background: #b18c4a;
z-index: 0;
transform-origin: left;
width: 0;
transition: width 0.5s linear;
transition: left 0.45s linear, width 0.45s linear; /* animate both */
}
/* ===========================

View File

@@ -128,7 +128,7 @@ function initTimelineSwiper() {
timelineItems.forEach((item, i) => {
item.classList.toggle("active", i === index);
});
const timelineWidth = document.querySelector(".timeline").offsetWidth - 40;
const timelineWidth = document.querySelector(".timeline").offsetWidth - 10;
const newWidth = (timelineWidth / (totalKites - 1)) * index;
if (lineFill) lineFill.style.width = newWidth + "px";
}