Commit c4204873 by doszhang

dos

parent c232e495
...@@ -79,4 +79,33 @@ body { ...@@ -79,4 +79,33 @@ body {
transform: translate(0, -50%); */ transform: translate(0, -50%); */
overflow: unset; overflow: unset;
display: none; display: none;
}
.point {
animation: point 2.5s linear infinite;
-webkit-animation: point 2.5s linear infinite;
}
@keyframes point {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.3;
}
}
@-webkit-keyframes point {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0.3;
}
} }
\ No newline at end of file
...@@ -55,6 +55,8 @@ var fireworkLock = false; ...@@ -55,6 +55,8 @@ var fireworkLock = false;
let posterCanvas, posterCtx; let posterCanvas, posterCtx;
let scrollTimer, showTitleStatus = false;
const guardian = [ const guardian = [
'事事顺意守', '事事顺意守',
'健康祈愿守', '健康祈愿守',
...@@ -82,6 +84,8 @@ $(document).ready(function () { ...@@ -82,6 +84,8 @@ $(document).ready(function () {
window.scroll(0, 0); //失焦后强制让页面归位 window.scroll(0, 0); //失焦后强制让页面归位
}); });
$('.container').on('scroll', showTitle)
$('.page1 .btn-next').on('click', toPage2); $('.page1 .btn-next').on('click', toPage2);
$('.page2 .btn-next').on('click', toPage3); $('.page2 .btn-next').on('click', toPage3);
...@@ -101,6 +105,22 @@ $(document).ready(function () { ...@@ -101,6 +105,22 @@ $(document).ready(function () {
$('.btn-retry').on('click', retry) $('.btn-retry').on('click', retry)
}); });
function showTitle() {
if (!showTitleStatus) {
return false;
}
if (scrollTimer !== null) {
clearTimeout(scrollTimer)
}
scrollTimer = setTimeout(() => {
const scrollTop = $('.container').scrollTop();
if (scrollTop > 700) {
$('.title').show();
showTitleStatus = true;
}
}, 100)
}
function toscene(event) { function toscene(event) {
const scene = event.data.scene; const scene = event.data.scene;
...@@ -131,6 +151,8 @@ function retry() { ...@@ -131,6 +151,8 @@ function retry() {
$('.page1').show(); $('.page1').show();
fireworkLock = false fireworkLock = false
updateWorld() updateWorld()
showTitleStatus = false
$('.title').hide()
} }
function createPoster(resultFlag) { function createPoster(resultFlag) {
......
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 sign in to comment