From 2a35f986eba09b86cb622ff9e13d1b34e8dfc6d7 Mon Sep 17 00:00:00 2001 From: PJ-568 Date: Wed, 31 Jul 2024 13:17:32 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index cb9b546..514a45a 100644 --- a/index.html +++ b/index.html @@ -1,15 +1,16 @@ - + + 全屏黑色页面 +
@@ -119,7 +122,7 @@ var home = document.getElementById("home"); var timeoutId = null; - fullScreenBtn.onclick = function() { + fullScreenBtn.onclick = function () { if (document.documentElement.requestFullscreen) { document.documentElement.requestFullscreen(); } else if (document.documentElement.mozRequestFullScreen) { @@ -129,36 +132,36 @@ } else if (document.documentElement.msRequestFullscreen) { document.documentElement.msRequestFullscreen(); } - - fullScreenBtn.style.display = "none"; }; - exitBtn.onclick = function() { + exitBtn.onclick = function () { window.open('', '_self', ''); window.close(); }; - document.onmousemove = function() { + document.onmousemove = function () { clearTimeout(timeoutId); - timeoutId = setTimeout(function() { + timeoutId = setTimeout(function () { document.body.style.cursor = "none"; + fullScreenBtn.style.display = "none"; exitBtn.style.display = "none"; download.style.display = "none"; back.style.display = "none"; home.style.display = "none"; }, 3000); document.body.style.cursor = "default"; + fullScreenBtn.style.display = "block"; exitBtn.style.display = "block"; download.style.display = "block"; back.style.display = "block"; home.style.display = "block"; }; - document.onkeydown = function(event) { + document.onkeydown = function (event) { if (event.keyCode === 32) { window.open('', '_self', ''); window.close(); } }; - - \ No newline at end of file + + \ No newline at end of file