55 lines
1.3 KiB
CSS
55 lines
1.3 KiB
CSS
:root {
|
|
--header-height: 60px;
|
|
--header-height-collapsed: 50px;
|
|
}
|
|
|
|
.js-sticky-navbar {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
height: var(--header-height);
|
|
line-height: var(--header-height);
|
|
padding: 0 10vw;
|
|
background: #663399; /* Old browsers */
|
|
background: -moz-linear-gradient(bottom, #663399 0%, #734e99 100%); /* FF3.6-15 */
|
|
background: -webkit-linear-gradient(bottom, #663399 0%,#734e99 100%); /* Chrome10-25,Safari5.1-6 */
|
|
background: linear-gradient(to top, #663399 0%,#734e99 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
|
|
color: white;
|
|
box-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.js-sticky-navbar li > a {
|
|
display: inline-block;
|
|
height: 100%;
|
|
padding: 0 13px;
|
|
color: white;
|
|
}
|
|
.js-sticky-navbar li > a:hover {
|
|
background-color: white;
|
|
color: rebeccapurple;
|
|
}
|
|
|
|
.js-sticky-navbar li.active {
|
|
background-color: #422063;
|
|
}
|
|
|
|
.navbar-sticky {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
height: var(--header-height-collapsed);
|
|
line-height: var(--header-height-collapsed);
|
|
z-index: 100;
|
|
transition: height 0.2s ease, line-height 0.2s ease;
|
|
}
|
|
.navbar-pushdown {
|
|
display: none;
|
|
height: var(--header-height);
|
|
}
|
|
.navbar-sticky + .navbar-pushdown {
|
|
display: block;
|
|
}
|