更新页面

This commit is contained in:
hanasaki-misaki
2023-03-17 22:50:05 +08:00
parent 1ff4a2909d
commit fb976f505e
11 changed files with 1341 additions and 547 deletions

View File

@@ -0,0 +1,18 @@
// JavaScript Document
function init(_el){
function start(_this){
$(_el).each(function(i){
$(this).css("animation-delay",`${++i * 0.2}s`);
let _this = $(this);
let windowHeight = $(window).height();
let windowScrollTop = $(window).scrollTop();
if(windowHeight + windowScrollTop > parseInt(_this.offset().top)){
_this.addClass(_this.data().animation);
}
})
}
$(window).on("scroll",function(){
start(_el)
})
start(_el)
}