Commit 94aafe11 authored by 姬鋆屾's avatar 姬鋆屾

tui

parent b59fc6fc
......@@ -26,14 +26,15 @@ body::-webkit-scrollbar {
}
.effect-content {
height: 200vh;
min-height: 1864rem;
/* height: 200vh;
min-height: 1864rem; */
overflow-y: hidden;
}
.effect-box {
position: sticky;
top: 0;
height: 100vh;
/* height: 100vh; */
min-height: 932rem;
background-color: #031233;
perspective: 800px;
......@@ -89,7 +90,7 @@ body::-webkit-scrollbar {
height: 64px;
font-size: 53px;
font-family: FZZhengHeiS-EB-GB;
font-weight: 400;
font-weight: 600;
color: #ffffff;
line-height: 64px;
text-align: center;
......
......@@ -1926,26 +1926,31 @@ class RollEventComp {
data.cb(index);
if (index >= 1) {
clearInterval(set);
// this_.show = false;
}
});
window.addEventListener("scroll", (event) => {
const scrollTop = document.documentElement.scrollTop;
const scrollHeight = document.documentElement.scrollHeight;
const clientHeight = document.documentElement.clientHeight;
let scrollPos = 0;
if (scrollTop + clientHeight >= scrollHeight - 5) {
scrollPos = 1;
} else if (scrollTop === 0) {
scrollPos = 0;
} else {
scrollPos = Number(
(scrollTop / (scrollHeight - clientHeight)).toFixed(3)
);
document.getElementsByClassName("content")[0].style.background =
"url(" +
require("@/assets/images/siteArrange/bg-pintai.jpg") +
") no-repeat";
document.getElementsByClassName("effect-box")[0].style.backgroundColor =
"unset";
}
console.log(scrollPos, "###########");
data.cb(scrollPos);
});
// window.addEventListener("scroll", (event) => {
// const scrollTop = document.documentElement.scrollTop;
// const scrollHeight = document.documentElement.scrollHeight;
// const clientHeight = document.documentElement.clientHeight;
// let scrollPos = 0;
// if (scrollTop + clientHeight >= scrollHeight - 5) {
// scrollPos = 1;
// } else if (scrollTop === 0) {
// scrollPos = 0;
// } else {
// scrollPos = Number(
// (scrollTop / (scrollHeight - clientHeight)).toFixed(3)
// );
// }
// console.log(scrollPos, "###########");
// data.cb(scrollPos);
// });
}
}
export default {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment