fix(header): 修正全螢幕高度失效問題

This commit is contained in:
2026-04-25 19:25:55 +08:00
parent a1dee6e709
commit 211c5b1690
-8
View File
@@ -355,14 +355,6 @@
</footer> </footer>
<!-- 粒子效果 --> <!-- 粒子效果 -->
<script> <script>
// 根據圖片比例 (1920:1080) 調整 header 高度
const header = document.querySelector('header');
function setHeaderHeight() {
const width = window.innerWidth;
const height = width * (1080 / 1920);
header.style.height = height + 'px';
}
// 確保在 DOM 完全載入後執行 // 確保在 DOM 完全載入後執行
if (document.readyState === 'loading') { if (document.readyState === 'loading') {