animated title
This commit is contained in:
parent
b9d956d072
commit
84eede76f5
5 changed files with 42 additions and 11 deletions
12
app/static/js/animation.js
Normal file
12
app/static/js/animation.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
document.querySelectorAll('body.animated').forEach(element => {
|
||||
var animationDuration = 60;
|
||||
var randomDuration = Math.random() * animationDuration;
|
||||
element.style.animationDelay = -randomDuration + 's';
|
||||
})
|
||||
document.querySelectorAll('.animated-title').forEach(element => {
|
||||
var animationDuration = 60;
|
||||
var randomDuration = Math.random() * animationDuration;
|
||||
element.querySelectorAll('.text').forEach(text => {
|
||||
text.style.animationDelay = -randomDuration + 's';
|
||||
}
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue