diff options
| author | muqiuhan <[email protected]> | 2026-03-15 12:08:48 +0000 |
|---|---|---|
| committer | muqiuhan <[email protected]> | 2026-03-15 12:08:48 +0000 |
| commit | 828b9cae99ea35b16a6e22f8b4ea8cab617c51d8 (patch) | |
| tree | d8a4bf71d51c4cbfec8c975a53f14ad00de5b16e /css/partials/header.css | |
| parent | e7adfc645c5624bc3b827d7233f6e78b33a90e79 (diff) | |
| download | blog-828b9cae99ea35b16a6e22f8b4ea8cab617c51d8.tar.gz | |
deploy: 8c4fb118dd728788cd4c7c57ebfc48a75860b987
Diffstat (limited to 'css/partials/header.css')
| -rw-r--r-- | css/partials/header.css | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/css/partials/header.css b/css/partials/header.css index 6606b3f0..44363f71 100644 --- a/css/partials/header.css +++ b/css/partials/header.css @@ -14,6 +14,13 @@ background: $color-background; } } +@media (max-width: 688px) { + @supports not (backdrop-filter: blur(12px)) { + .header-inner .site-nav .menu-list { + background: $color-background; + } + } +} .header-inner { display: flex; flex-wrap: nowrap; @@ -54,6 +61,9 @@ display: flex; } @media (max-width: 688px) { + .header { + overflow: visible; + } .header-inner { flex-wrap: wrap; align-items: center; @@ -69,6 +79,10 @@ height: 100%; cursor: pointer; color: $color-text-primary; + transition: color $transition-duration ease; + } + .header-inner #menu-btn:hover { + color: $color-accent; } .header-inner .site-brand-container { display: flex; @@ -80,20 +94,30 @@ width: 100%; } .header-inner .site-nav .menu-list { - height: 0; + display: flex; + flex-direction: column; + max-height: 0; overflow: hidden; margin-top: 0; + background: $color-glass; + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border-top: 1px solid $color-border; + transition: max-height 300ms ease-out; + text-align: left; + } + .header-inner .site-nav .menu-list.active { + max-height: 400px; } .header-inner .site-nav .menu-list .menu-item { - margin-right: 0; - margin-left: auto; - margin-top: $margin-s-1; - padding: $margin-s-1 0; + margin: 0; + padding: $margin-m-0 $margin-m-1; + border-bottom: 1px solid $color-border; } - .header-inner .site-nav .active { - margin-top: $margin-s-0; - margin-bottom: $margin-s-0; - height: auto; - flex-direction: column; + .header-inner .site-nav .menu-list .menu-item:last-child { + border-bottom: none; + } + .header-inner .site-nav .menu-list .menu-item a { + display: block; } } |
