Skip to content

Commit 510ff05

Browse files
committed
fix: sync animation for bullets and dividers
1 parent 4629e61 commit 510ff05

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/components/ScrollAnimation.astro

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
const articleContent = document.querySelector('.article-content');
77
if (!articleContent) return;
88

9-
const elements = articleContent.querySelectorAll('p, h1, h2, h3, h4, h5, h6, ul, ol, pre, blockquote, img, table');
9+
const elements = articleContent.querySelectorAll('p, h1, h2, h3, h4, h5, h6, ul, ol, pre, blockquote, img, table, hr');
1010

11-
elements.forEach((el, index) => {
11+
elements.forEach((el) => {
1212
el.classList.add('scroll-animate');
13-
(el as HTMLElement).style.transitionDelay = `${index * 0.02}s`;
1413
});
1514

1615
const observer = new IntersectionObserver(

0 commit comments

Comments
 (0)