Skip to content

Commit 52d6aad

Browse files
committed
フッダー調整
1 parent 3336fe7 commit 52d6aad

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

WebSite/assets/css/layout.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,20 @@
275275
/* ==========================================================================
276276
4. フッター
277277
========================================================================== */
278+
/* フッターをヘッダーと同じようにスティッキーにして、
279+
メニュー展開等で body に no-scroll クラスが付与された時は固定に切り替える */
278280
.site-footer {
279281
border-top: 1px solid var(--color-border);
280282
background: var(--color-surface);
281283
padding: 1rem 1.25rem 1.5rem;
282284
font-size: 0.875rem;
283285
color: var(--color-text-muted);
284286
flex-shrink: 0;
287+
288+
/* sticky で画面下に固定 */
289+
position: sticky;
290+
bottom: 0;
291+
z-index: 100; /* ヘッダーと同等のレイヤーに配置 */
285292
}
286293

287294
.site-footer__inner {
@@ -476,6 +483,19 @@ body.no-scroll .site-header {
476483
width: 100%;
477484
}
478485

486+
/* メニュー展開時はフッターも固定に切り替える(ヘッダーと同様の挙動) */
487+
body.no-scroll .site-footer {
488+
position: fixed;
489+
bottom: 0;
490+
left: 0;
491+
width: 100%;
492+
}
493+
494+
/* footer が固定表示になると main の下部が隠れる場合があるため、
495+
必要に応じてページのコンテンツ側で padding-bottom を調整してください。
496+
このCSSはレイアウトを大きく変更しないよう、既存の構造に合わせて
497+
ヘッダーと同等の挙動に揃えるのみを行っています。 */
498+
479499
#menuAnimationCanvas {
480500
position: fixed; /* absolute から fixed に変更して背景固定 */
481501
top: 0;

0 commit comments

Comments
 (0)