From abd2d8185ee21d25b6a822971bcf884b31673fe0 Mon Sep 17 00:00:00 2001 From: XPoet Date: Thu, 24 Dec 2020 21:40:41 +0800 Subject: [PATCH] style: optimize header style --- source/css/layout/_partial/header.styl | 37 +++++++++++++++++--------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/source/css/layout/_partial/header.styl b/source/css/layout/_partial/header.styl index 08a2de4..26f950d 100644 --- a/source/css/layout/_partial/header.styl +++ b/source/css/layout/_partial/header.styl @@ -34,12 +34,15 @@ $logo-title-font-size = 2.2rem; } .left { + display: flex; + align-items: center; .logo-title { font-size: $logo-title-font-size; font-weight: bold; letter-spacing: 1px; color: var(--first-text-color); + transition(); +keep-tablet() { font-size: $logo-title-font-size * 0.9; @@ -167,7 +170,6 @@ $logo-title-font-size = 2.2rem; .menu-bar-middle { width: 18px; height: 2.6px; - //margin: 6px 0; position: relative; background: var(--default-text-color); transition(); @@ -306,25 +308,34 @@ $logo-title-font-size = 2.2rem; .header-content { - .logo-title { - transform: scale(0.8); + .left { + transform: scale(0.88); transform-origin: left top; + transition(); } - .menu-list { - .menu-item { - a:hover { - &::after { - bottom: -($header-shrink-height / 2 - 12); - } - } + .right { + + .pc { + + .menu-list { + .menu-item { + a:hover { + &::after { + bottom: -($header-shrink-height / 2 - 12); + } + } + + .active::after { + bottom: -($header-shrink-height / 2 - 12); + } + } - .active::after { - bottom: -($header-shrink-height / 2 - 12); } } - } + + }