大屏更新、源头管理
This commit is contained in:
@ -269,9 +269,48 @@ pageEncoding="UTF-8"%>
|
||||
z-index: 100;
|
||||
display: none;
|
||||
}
|
||||
/* 全屏提示遮罩 */
|
||||
.fullscreen-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.9);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
cursor: pointer;
|
||||
}
|
||||
.fullscreen-overlay .tip-content {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
.fullscreen-overlay .tip-content h2 {
|
||||
font-size: 48px;
|
||||
margin-bottom: 20px;
|
||||
color: #46F2FF;
|
||||
}
|
||||
.fullscreen-overlay .tip-content p {
|
||||
font-size: 24px;
|
||||
color: #7ef3ff;
|
||||
}
|
||||
.fullscreen-overlay .tip-content .icon {
|
||||
font-size: 80px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 全屏提示遮罩 -->
|
||||
<div class="fullscreen-overlay" id="fullscreenOverlay" onclick="enterFullscreen()">
|
||||
<div class="tip-content">
|
||||
<div class="icon">🖥️</div>
|
||||
<h2>点击进入全屏展示</h2>
|
||||
<p>按 ESC 键可退出全屏</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="screen-container">
|
||||
<div class="rank-module-container">
|
||||
<!-- Statistics -->
|
||||
@ -367,8 +406,34 @@ pageEncoding="UTF-8"%>
|
||||
var currentFocusIndex = 0;
|
||||
var rotationTimer = null;
|
||||
|
||||
// 进入全屏函数
|
||||
function enterFullscreen() {
|
||||
var elem = document.documentElement;
|
||||
if (elem.requestFullscreen) {
|
||||
elem.requestFullscreen();
|
||||
} else if (elem.webkitRequestFullscreen) {
|
||||
elem.webkitRequestFullscreen();
|
||||
} else if (elem.msRequestFullscreen) {
|
||||
elem.msRequestFullscreen();
|
||||
}
|
||||
document.getElementById('fullscreenOverlay').style.display = 'none';
|
||||
}
|
||||
|
||||
// 监听全屏状态变化
|
||||
document.addEventListener('fullscreenchange', function() {
|
||||
var overlay = document.getElementById('fullscreenOverlay');
|
||||
if (!document.fullscreenElement) {
|
||||
overlay.style.display = 'flex';
|
||||
}
|
||||
});
|
||||
document.addEventListener('webkitfullscreenchange', function() {
|
||||
var overlay = document.getElementById('fullscreenOverlay');
|
||||
if (!document.webkitFullscreenElement) {
|
||||
overlay.style.display = 'flex';
|
||||
}
|
||||
});
|
||||
|
||||
$(document).ready(function () {
|
||||
launchIntoFullscreen(document.documentElement);
|
||||
initData();
|
||||
|
||||
// Double click to toggle fullscreen
|
||||
|
||||
Reference in New Issue
Block a user