update timeline line filling animation
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
|
||||
/* ===========================
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user