Commit 87f850c9 authored by minseok.park's avatar minseok.park

update header style

parent 6d188ba8
...@@ -10,7 +10,6 @@ body { ...@@ -10,7 +10,6 @@ body {
.navbar { .navbar {
background: var(--nav-background); background: var(--nav-background);
box-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.1), 0 0.4rem 0.6rem rgba(0, 0, 0, 0.1);
color: var(--color-bwg-main); color: var(--color-bwg-main);
height: 4.5rem; height: 4.5rem;
font-size: calc(16 / var(--rem-base) * 1rem); font-size: calc(16 / var(--rem-base) * 1rem);
...@@ -19,6 +18,16 @@ body { ...@@ -19,6 +18,16 @@ body {
width: 100%; width: 100%;
z-index: var(--z-index-navbar); z-index: var(--z-index-navbar);
max-height: 5rem; max-height: 5rem;
border-bottom: 1px solid var(--color-blue-30);
transition: box-shadow .2s;
}
.navbar .active {
box-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.1), 0 0.4rem 0.6rem rgba(0, 0, 0, 0.1);
}
.navbar.active {
box-shadow: 0 0 0.4rem rgba(0, 0, 0, 0.1), 0 0.4rem 0.6rem rgba(0, 0, 0, 0.1);
} }
.navbar a { .navbar a {
......
;(function () {
'use strict'
document.addEventListener('scroll', function () {
var navbar = document.querySelector('.navbar')
if (window.scrollY > 0) {
navbar.classList.add('active')
} else {
navbar.classList.remove('active')
}
})
})()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment