2025-02-17 18:34:21 +08:00

190 lines
3.3 KiB
Plaintext

header.vh-header {
position: fixed;
left: 0;
top: 0;
box-sizing: border-box;
padding: 0 1rem;
display: flex;
align-items: center;
justify-content: center;
width: 100vw;
height: 3.6rem;
background: #ffffff66;
backdrop-filter: blur(2rem);
box-shadow: 0 3px 8px 6px rgba(7, 17, 27, 0.05);
z-index: 9;
&>section.main {
position: relative;
margin: 0 auto;
box-sizing: border-box;
padding: 0 1rem;
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
height: 80%;
max-width: var(--vh-main-max-width);
a,
span.nav-btn-item {
flex-shrink: 0;
position: relative;
box-sizing: border-box;
padding: 0 0.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
width: max-content;
height: 80%;
font-size: 1rem;
font-weight: bold;
z-index: 1;
transition: all 0.08s ease-in-out;
user-select: none;
cursor: pointer;
&:hover {
&::before {
transform: scale(1.2);
opacity: 1;
}
&::after {
opacity: 0;
}
}
&::before {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 0.5rem;
background: #EDEEF3;
opacity: 0;
transition: transform 0.16s ease-in-out, opacity 0.16s ease-in-out;
z-index: -1;
}
&.search-btn {
&>svg {
width: 1rem;
height: 1rem;
}
}
&>svg {
height: 1.5rem;
}
&.index {
padding-right: 2rem;
}
}
&>.link-list,
&>.nav-btn {
flex: 1;
box-sizing: border-box;
padding-right: 1rem;
display: flex;
align-items: center;
justify-content: flex-end;
gap: 0.88rem;
height: 100%;
width: max-content;
max-width: 100%;
&:nth-last-of-type(1) {
padding-right: 0;
}
&>a,
&>span {
&.active {
pointer-events: none;
&::before {
transform: scale(1);
opacity: 1;
}
}
&>span {
display: flex;
width: 1.08rem;
height: 1.08rem;
&>svg {
width: 100%;
height: 100%;
}
}
}
}
&>.nav-btn {
flex: none;
width: max-content;
&>.menu-btn {
display: none;
&>svg {
box-sizing: border-box;
padding: 0.36rem;
width: 1.88rem;
height: 1.88rem;
border: 1px solid #EDEEF3;
border-radius: 0.6rem;
}
}
}
}
}
@media screen and (max-width: 888px) {
header.vh-header {
padding: 0;
&>section.main {
a {
font-size: 0.875rem;
&:hover {
&::before {
transform: scale(1.1);
}
}
&>svg {
width: 1.18rem;
height: 1.18rem;
}
}
&>.link-list {
display: none;
}
}
}
}
@media screen and (max-width: 888px) {
header.vh-header {
&>section.main {
&>.nav-btn {
&>.menu-btn {
display: flex;
}
}
}
}
}