Line 238: | Line 238: | ||
} | } | ||
− | + | @media only screen and (min-width: 1170px) { | |
+ | .cd-header { | ||
+ | -webkit-transition: background-color 0.3s; | ||
+ | -moz-transition: background-color 0.3s; | ||
+ | transition: background-color 0.3s; | ||
+ | |||
+ | -webkit-transform: translate3d(0, 0, 0); | ||
+ | -moz-transform: translate3d(0, 0, 0); | ||
+ | -ms-transform: translate3d(0, 0, 0); | ||
+ | -o-transform: translate3d(0, 0, 0); | ||
+ | transform: translate3d(0, 0, 0); | ||
+ | -webkit-backface-visibility: hidden; | ||
+ | backface-visibility: hidden; | ||
+ | } | ||
+ | |||
+ | /*.cd-header.is-fixed { | ||
+ | /* when the user scrolls down, we hide the header right above the viewport */ | ||
+ | position: fixed; | ||
+ | top: -80px; | ||
+ | background-color: rgba(2, 23, 37, 0.96); | ||
+ | -webkit-transition: -webkit-transform 0.3s; | ||
+ | -moz-transition: -moz-transform 0.3s; | ||
+ | transition: transform 0.3s; | ||
+ | } */ | ||
+ | .cd-header.is-visible { | ||
+ | /* if the user changes the scrolling direction, we show the header */ | ||
+ | -webkit-transform: translate3d(0, 100%, 0); | ||
+ | -moz-transform: translate3d(0, 100%, 0); | ||
+ | -ms-transform: translate3d(0, 100%, 0); | ||
+ | -o-transform: translate3d(0, 100%, 0); | ||
+ | transform: translate3d(0, 100%, 0); | ||
+ | } | ||
+ | |||
+ | .cd-header.menu-is-open { | ||
+ | /* add a background color to the header when the navigation is open */ | ||
+ | /*菜单打开后最上边那条横杠的颜色*/ | ||
+ | background-color: rgba(2, 23, 37, 0); | ||
+ | } | ||
+ | } | ||
.cd-logo { | .cd-logo { |
Revision as of 18:09, 13 October 2019