fix(header): 修正全螢幕高度失效問題
This commit is contained in:
@@ -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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user