You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

167 lines
3.7 KiB

<!DOCTYPE html>
<!-- 本文件由 PJ568 撰写 -->
<!-- 本文件遵循 Attribution-ShareAlike 4.0 International -->
<html>
<head>
<meta charset="UTF-8">
<script src="/js/loading.js"></script>
<title>全屏黑色页面</title>
<link rel="icon" type="image/svg+xml" href="/img/icon.svg">
<style type="text/css">
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background-color: black;
}
a {
width: 100px;
height: 50px;
border: 2px solid #0277BD;
border-radius: 6px;
background: #424242;
color: #ccc;
text-align: center;
line-height: 50px;
font-size: 24px;
cursor: pointer;
border-radius: 6px
}
a:hover {
color: #BDBDBD;
background-color: #212121;
}
#home {
position: absolute;
top: 20px;
left: calc(50% - 50px)
}
#download {
position: absolute;
top: 100px;
left: 20px
}
#back {
position: absolute;
top: 20px;
left: 20px
}
#fullScreenBtn {
position: fixed;
top: calc(50% - 25px);
left: calc(50% - 100px);
width: 200px;
height: 50px;
border: 2px solid #0277BD;
border-radius: 6px;
background: #424242;
color: #ccc;
text-align: center;
line-height: 50px;
font-size: 24px;
cursor: pointer;
}
#exitBtn {
position: absolute;
top: 20px;
right: 20px;
width: 50px;
height: 50px;
border: 2px solid #0277BD;
border-radius: 6px;
background: #424242;
color: #ccc;
text-align: center;
line-height: 50px;
font-size: 24px;
cursor: pointer;
border-radius: 6px;
}
#fullScreenBtn:hover {
color: #BDBDBD;
background-color: #212121;
}
#exitBtn:hover {
color: #BDBDBD;
background-color: #212121;
}
@import url(/css/tool_type.css);
</style>
</head>
<body>
<div id="loading">
<div id="loading_bg">
<div class="loader">正在加载</div>
</div>
</div>
<a id="back" onclick="javascript:history.go(-1);">尝试返回</a>
<a id="download" href="index.html" download="黑色全屏.html">下载本页</a>
<a id="home" href="/">返回主页</a>
<div id="fullScreenBtn">进入全屏</div>
<div id="exitBtn">退出</div>
</body>
<script type="text/javascript">
var fullScreenBtn = document.getElementById("fullScreenBtn");
var exitBtn = document.getElementById("exitBtn");
var download = document.getElementById("download");
var back = document.getElementById("back");
var home = document.getElementById("home");
var timeoutId = null;
fullScreenBtn.onclick = function () {
if (document.documentElement.requestFullscreen) {
document.documentElement.requestFullscreen();
} else if (document.documentElement.mozRequestFullScreen) {
document.documentElement.mozRequestFullScreen();
} else if (document.documentElement.webkitRequestFullScreen) {
document.documentElement.webkitRequestFullScreen();
} else if (document.documentElement.msRequestFullscreen) {
document.documentElement.msRequestFullscreen();
}
};
exitBtn.onclick = function () {
window.open('', '_self', ''); window.close();
};
document.onmousemove = function () {
clearTimeout(timeoutId);
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) {
if (event.keyCode === 32) {
window.open('', '_self', ''); window.close();
}
};
</script>
</html>