Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Fgaoxing committed Nov 25, 2023
1 parent 4e53e72 commit 94cbf91
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ document.addEventListener("DOMContentLoaded", function () {
// 滚动
document.addEventListener('scroll', function (event) {
if (document.documentElement.clientWidth <= 640) {
if (document.querySelector(".show>.first>.content").getBoundingClientRect().top < document.documentElement.clientHeight) {
document.querySelector(".show>.first>.content>.screenshot").style.transition = "transform 2s"
document.querySelector(".show>.first>.content>.screenshot").style.transform = "translate(0px,0px)"
} else {
document.querySelector(".show>.first>.content>.screenshot").style.transition = "transform 0s"
document.querySelector(".show>.first>.content>.screenshot").style.transform = "translate(0px,300px)"
}
return
}
var scrollTop = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop;
Expand Down

0 comments on commit 94cbf91

Please sign in to comment.