mirror of
https://github.com/pabloquablo/RTA-test.git
synced 2026-11-22 19:42:59 +01:00
que
This commit is contained in:
1 parent
a56c55ad8e
commit
8010876630
3 files changed
+76
No files matched your search
@@ -0,0 +1,21 @@
|
||||
window.onload = function() {
|
||||
const articles = document.querySelectorAll('h2 + p');
|
||||
|
||||
articles.forEach(article => {
|
||||
article.style.opacity = '0';
|
||||
|
||||
const fadeIn = () => {
|
||||
let opacity = 0;
|
||||
const interval = setInterval(() => {
|
||||
opacity += 0.05;
|
||||
article.style.opacity = opacity;
|
||||
|
||||
if (opacity >= 1) {
|
||||
clearInterval(interval);
|
||||
}
|
||||
}, 30);
|
||||
};
|
||||
|
||||
setTimeout(fadeIn, 500 * articles.indexOf(article));
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user