<header class="header-main"> <a class='header-main__menu js-menu-toggle'> <div class='header-main__menu-bars'></div> </a> </header> <section class="header-menu height--100"> <div class="header-menu__content"> <nav class="header-menu__nav-cases"> <span class="nav__label">Stories</span> <ul> <li> <article class="header-menu__page"> <span class="page__label">01 <span>Pemco</span></span> <img src="https://unsplash.it/g/600/400?image=453"/> </article> </li> <li> <article class="header-menu__page"> <span class="page__label">02 <span>Acme</span></span> <img src="https://unsplash.it/g/600/400?image=486"/> </article> </li> <li> <article class="header-menu__page"> <span class="page__label">03 <span>Turtles</span></span> <img src="https://unsplash.it/g/600/400?image=655"/> </article> </li> <li> <article class="header-menu__page"> <span class="page__label">04 <span>Wombats</span></span> <img src="https://unsplash.it/g/600/400?image=735"/> </article> </li> <li> <article class="header-menu__page"> <span class="page__label">05 <span>Meerkat</span></span> <img src="https://unsplash.it/g/600/400?image=802"/> </article> </li> <li> <article class="header-menu__page"> <span class="page__label">06 <span>Stink Beetles</span></span> <img src="https://unsplash.it/g/600/400?image=939"/> </article> </li> <li> <article class="header-menu__page"> <span class="page__label">07 <span>Donkeys</span></span> <img src="https://unsplash.it/g/600/400?image=335"/> </article> </li> <li> <article class="header-menu__page"> <span class="page__label">08 <span>Sheeps</span></span> <img src="https://unsplash.it/g/600/400?image=811"/> </article> </li> <li> <article class="header-menu__page"> <span class="page__label">09 <span>Cuttle Fishes</span></span> <img src="https://unsplash.it/g/600/400?image=919"/> </article> </li> </ul> </nav> </div> </section> <!-- Main ============================== --> <main role="main"> <!-- Mast ============================== --> <section class="mast-page mast--overlay align--vcenter height--100"> <div class="mast-page__content"> <h1>This A Header</h1> <p>And this right here is a little intro paragraphy.</p> </div> </section> </main> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> //Скрипт js надо подключать здесь //Автор: Stephen Scaff. @StephenScaff ::-webkit-scrollbar-thumb { background-color: transparent; } ::-webkit-scrollbar { -webkit-appearance: none; width: 5px; height: 5px; background: transparent; } /*--------------------------------- --mixin for links ----------------------------------- */ /*----------------------------- --Mixin for Overlays ------------------------------- */ /*--------------------------------- -Setup ----------------------------------- */ *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { font-size: 100%; overflow-y: scroll; overflow-x: hidden; width: 100%; -webkit-text-size-adjust: 100%; background-color: #fff; } /*--------------------------------- --Typography ----------------------------------- */ body { font-family: "Source Serif Pro", georgia, times, serif; color: #444; position: relative; width: 100%; font-weight: 400; font-style: normal; line-height: 1.9; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; margin: 0; } /*--------------------------------- --Fluid body sizing ----------------------------------- */ body { font-size: 100%; } @media (min-width: 36em) { body { font-size: 110%; } } @media (min-width: 58em) { body { font-size: 120%; } } @media (min-width: 86em) { body { font-size: 130%; } } @media (min-width: 115em) { body { font-size: 160%; } } @media (min-width: 125em) { body { font-size: 170%; } } @media (min-width: 145em) { body { font-size: 180%; } } /*--------------------------------- --Images ----------------------------------- */ img, object, embed { max-width: 100%; height: auto; } img { -ms-interpolation-mode: bicubic; border: 0; max-width: 100%; width: 100%; } figure { margin: 1em 0; } .code-block { font-size: 75%; background-color: #eee; display: block; padding: 2em; border-radius: 4px; overflow-x: scroll; } /*--------------------------------- --Headers ----------------------------------- */ h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; display: block; font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; text-rendering: optimizeLegibility; } /*--------------------------------- --h1 Theme ----------------------------------- */ h1, .font-h1 { font-size: 2em; line-height: 1; margin-bottom: 0.25em; } @media (min-width: 58em) { h1, .font-h1 { font-size: 2.15em; } } @media (min-width: 115em) { h1, .font-h1 { font-size: 2.4em; } } /*--------------------------------- --h2 theme ----------------------------------- */ h2, .font-h2 { font-size: 1.75em; line-height: 1.35; margin-bottom: 0.5em; } @media (min-width: 115em) { h2, .font-h2 { font-size: 2em; } } /*--------------------------------- --h3 Theme ----------------------------------- */ h3, .font-h3 { font-size: 1.4em; line-height: 1.35; margin-bottom: 0.6em; } @media (min-width: 115em) { h3, .font-h3 { font-size: 1.65em; } } /*--------------------------------- --h4 Theme ----------------------------------- */ h4, .font-h4 { font-size: 1.2em; line-height: 1.4; margin-bottom: 0.5em; font-weight: 400; } @media (min-width: 115em) { h4, .font-h4 { font-size: 1.45em; } } /*--------------------------------- --h5 theme ----------------------------------- */ h5, .font-h5 { font-size: 0.9em; line-height: 1.4; margin-bottom: 0.4em; } /*--------------------------------- --Headers Apply Theme ----------------------------------- */ /*-------------------------------- --Font Lead ---------------------------------- */ .font-lead { font-size: 120%; hyphens: none; margin-bottom: 0.8em; line-height: 1.6; } @media (min-width: 58em) { .font-lead { font-size: 135%; } } /*--------------------------------- --typography ----------------------------------- */ p { margin-top: 0; margin-bottom: 1.3em; } small { font-size: 0.77em; } /*-------------------------------- --Links ---------------------------------- */ a { color: #63F1E3; text-decoration: none; line-height: inherit; -webkit-transition: color 0.4s ease-in-out; -moz-transition: color 0.4s ease-in-out; transition: color 0.4s ease-in-out; } a:hover, a:focus { color: #a9f7f0; -webkit-transition: color 0.4s ease-out-out; -moz-transition: color 0.4s ease-out-out; transition: color 0.4s ease-out-out; } a:active { color: #34eddb; } /*-------------------------------- --Selection ---------------------------------- */ *::selection { background: #0c82a5; color: white; } /*--------------------------------- --Layout: Row/container ----------------------------------- */ .row { width: 90%; margin-left: auto; margin-right: auto; } @media (min-width: 36em) { .row { max-width: 80%; } } @media (min-width: 86em) { .row { max-width: 60%; } } .stacked { border: 0; border-top: 1px solid #ddd; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 4px 0 -1px #FFF, 0 4px 1px 0px rgba(0, 0, 0, 0.19), 0 8px 0 -2px #FFF, 0 8px 2px -1px rgba(0, 0, 0, 0.17); } /*--------------------------------- --Layout: Positoning ----------------------------------- */ .align--vcenter, .align--top, .align--bottom { display: -webkit-box; display: -moz-box; display: box; display: -webkit-flex; display: -moz-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -moz-box-pack: center; box-pack: center; -webkit-justify-content: center; -moz-justify-content: center; -ms-justify-content: center; -o-justify-content: center; justify-content: center; -ms-flex-pack: center; } .align--vcenter { -webkit-box-align: center; -moz-box-align: center; box-align: center; -webkit-align-items: center; -moz-align-items: center; -ms-align-items: center; -o-align-items: center; align-items: center; -ms-flex-align: center; } .align--vtop { -webkit-box-align: start; -moz-box-align: start; box-align: start; -webkit-align-items: flex-start; -moz-align-items: flex-start; -ms-align-items: flex-start; -o-align-items: flex-start; align-items: flex-start; -ms-flex-align: start; } .align--vbottom { -webkit-box-align: end; -moz-box-align: end; box-align: end; -webkit-align-items: flex-end; -moz-align-items: flex-end; -ms-align-items: flex-end; -o-align-items: flex-end; align-items: flex-end; -ms-flex-align: end; } /*--------------------------------- --Height modifier ----------------------------------- */ .height--100 { height: 100vh; } /*--------------------------------- --Header ----------------------------------- */ .header-main { position: fixed; z-index: 98; top: 0; left: 0; right: 1em; width: 100%; } .header-main__menu { position: absolute; right: 1em; top: 0.5em; } /*------------------------------- --Mobile Nav: Menu Bars ---------------------------------- */ .header-main__menu-bars { width: 2rem; height: 1px; margin: 0.75em 0; background: #fff; position: relative; z-index: 99; -webkit-transition: top 0.3s ease-in-out; -moz-transition: top 0.3s ease-in-out; transition: top 0.3s ease-in-out; } .header-main__menu-bars:before { top: -8px; } .header-main__menu-bars:after { top: 8px; } .header-main__menu-bars:after, .header-main__menu-bars:before { content: ""; display: block; width: 2rem; height: 1px; background: #fff; position: absolute; z-index: -1; -webkit-transition: all 0.3s ease-in-out; -moz-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out; } .header-main__menu-bars:hover { cursor: pointer; } /*--------------------------------- --Header-menu -offcanvas ----------------------------------- */ .header-menu { background-color: rgba(0, 0, 0, 0.5); position: fixed; z-index: 91; top: 0; left: 0; width: 100%; height: 100%; overflow-y: scroll; -webkit-overflow-scrolling: touch; z-index: -1; -webkit-transform: scale(15); -moz-transform: scale(15); -ms-transform: scale(15); -o-transform: scale(15); transform: scale(15); -webkit-transition: all 0.7s cubic-bezier(0.77, 0, 0.175, 1); -moz-transition: all 0.7s cubic-bezier(0.77, 0, 0.175, 1); transition: all 0.7s cubic-bezier(0.77, 0, 0.175, 1); } .header-menu .header-menu__content { margin-top: 4em; padding: 0 1%; } .header-menu .nav__label { font-family: "Roboto Condensed", "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; text-transform: uppercase; font-size: 0.6em; padding-left: 0.5em; color: rgba(255, 255, 255, 0.4); } .header-menu__nav { position: relative; z-index: 99; } .header-menu__nav { *zoom: 1; } .header-menu__nav:before, .header-menu__nav:after { content: ""; display: table; } .header-menu__nav:after { clear: both; } .header-menu__nav li { display: inline; -webkit-transition: opacity 0.6s ease, -webkit-transform 4s ease; -moz-transition: opacity 0.6s ease, -moz-transform 4s ease; transition: opacity 0.6s ease, transform 4s ease; } .header-menu nav { position: relative; z-index: 99; } .header-menu nav ul { list-style: none; margin: 0; padding: 0; } .header-menu nav ul li { opacity: 0; -webkit-transition: all 0.6s ease; -moz-transition: all 0.6s ease; transition: all 0.6s ease; } .header-menu .header-menu__nav { width: 100%; } .header-menu .header-menu__nav a { font-family: "Roboto Condensed", "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 1em; text-transform: uppercase; letter-spacing: 0.05em; position: relative; overflow: hidden; display: inline-block; padding: 0 0.25em; color: rgba(255, 255, 255, 0.9); text-decoration: none; line-height: inherit; -webkit-transition: color 0.4s ease-in-out; -moz-transition: color 0.4s ease-in-out; transition: color 0.4s ease-in-out; } .header-menu .header-menu__nav a:hover, .header-menu .header-menu__nav a:focus { color: rgba(255, 255, 255, 0.4); -webkit-transition: color 0.4s ease-out-out; -moz-transition: color 0.4s ease-out-out; transition: color 0.4s ease-out-out; } .header-menu .header-menu__nav a:active { color: rgba(191, 191, 191, 0.4); } .header-menu .header-menu__nav a:after { content: ""; position: absolute; height: 2px; background-color: rgba(255, 255, 255, 0.4); left: 0; right: 0; top: 60%; margin: 0 auto; -webkit-transform: translateX(-100%); -moz-transform: translateX(-100%); -ms-transform: translateX(-100%); -o-transform: translateX(-100%); transform: translateX(-100%); -webkit-transition: all 0.6s ease; -moz-transition: all 0.6s ease; transition: all 0.6s ease; } .header-menu .header-menu__nav a:hover:after { width: 100%; -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); -webkit-transition: -webkit-transform 0.6s ease; -moz-transition: -moz-transform 0.6s ease; transition: transform 0.6s ease; } .header-menu .header-menu__nav-cases { width: 100%; } .header-menu .header-menu__nav-cases ul { margin-left: -0.6%; margin-right: -0.6%; } .header-menu .header-menu__nav-cases ul li { list-style: none; font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: 0.05em; position: relative; float: left; width: 33.333%; padding: 1%; } .header-menu .page__label { font-family: "Roboto Condensed", "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.9rem; padding-left: 1em; } .header-menu .page__label span { font-family: "Source Serif Pro", georgia, times, serif; font-style: italic; } .header-menu .header-menu__page { background: #fff; float: left; box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2); } .header-menu .header-menu__page img { float: left; } /*---------------------------------- --JS-Nav-Open: Menu Bars Animate ----------------------------------- */ .js-menu--is-open { /*--Menu-bars--*/ /*-- is--open header-menu --*/ } .js-menu--is-open .header-main__menu-bars { background: none !important; } .js-menu--is-open .header-main__menu-bars:after, .js-menu--is-open .header-main__menu-bars:before { top: 0 !important; background: #fff !important; zoom: 1; } .js-menu--is-open .header-main__menu-bars:after { -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); } .js-menu--is-open .header-main__menu-bars:before { -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); } .js-menu--is-open .header-menu { height: 100%; opacity: 1; z-index: 91; background-color: #333; -webkit-transform: scale(1); -moz-transform: scale(1); -ms-transform: scale(1); -o-transform: scale(1); transform: scale(1); -webkit-transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1); -moz-transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1); transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1); } .js-menu--is-open .header-menu nav li { opacity: 1; -webkit-transform: translateY(0); -moz-transform: translateY(0); -ms-transform: translateY(0); -o-transform: translateY(0); transform: translateY(0); -webkit-transition: all 0.6s 0.6s ease; -moz-transition: all 0.6s 0.6s ease; transition: all 0.6s 0.6s ease; } .js-menu--is-open .header-menu nav li:nth-of-type(1n) { -webkit-transition-delay: 0.6s; -moz-transition-delay: 0.6s; transition-delay: 0.6s; } .js-menu--is-open .header-menu nav li:nth-of-type(2n) { -webkit-transition-delay: 0.7s; -moz-transition-delay: 0.7s; transition-delay: 0.7s; } .js-menu--is-open .header-menu nav li:nth-of-type(3n) { -webkit-transition-delay: 0.8s; -moz-transition-delay: 0.8s; transition-delay: 0.8s; } .js-menu--is-open .header-menu nav li:nth-of-type(4n) { -webkit-transition-delay: 0.9s; -moz-transition-delay: 0.9s; transition-delay: 0.9s; } .js-menu--is-open .header-menu nav li:nth-of-type(5n) { -webkit-transition-delay: 1s; -moz-transition-delay: 1s; transition-delay: 1s; } .js-menu--is-open .header-menu nav li:nth-of-type(6n) { -webkit-transition-delay: 1.1s; -moz-transition-delay: 1.1s; transition-delay: 1.1s; } .js-menu--is-open .header-menu nav li:nth-of-type(7n) { -webkit-transition-delay: 1.2s; -moz-transition-delay: 1.2s; transition-delay: 1.2s; } .js-menu--is-open .header-menu nav li:nth-of-type(8n) { -webkit-transition-delay: 1.3s; -moz-transition-delay: 1.3s; transition-delay: 1.3s; } .js-menu--is-open .header-menu nav li:nth-of-type(9n) { -webkit-transition-delay: 1.4s; -moz-transition-delay: 1.4s; transition-delay: 1.4s; } .js-menu--is-open .header-menu:before { -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); -webkit-transition: all 0.6s 0.6s cubic-bezier(0.77, 0, 0.175, 1); -moz-transition: all 0.6s 0.6s cubic-bezier(0.77, 0, 0.175, 1); transition: all 0.6s 0.6s cubic-bezier(0.77, 0, 0.175, 1); } .js-menu--is-open .header-menu:after { -webkit-transform: translateX(0); -moz-transform: translateX(0); -ms-transform: translateX(0); -o-transform: translateX(0); transform: translateX(0); -webkit-transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1); -moz-transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1); transition: all 0.6s cubic-bezier(0.77, 0, 0.175, 1); } /*--------------------------------- --Sections ----------------------------------- */ .section--padding { padding: 2em 0; } @media (min-width: 58em) { .section--padding { padding: 4em 0; } } /*--------------------------------- --overlay ----------------------------------- */ .mast--overlay { position: relative; } .mast--overlay:before { content: ""; display: block; position: absolute; top: 0; right: 0; bottom: 0; left: 0; background-color: rgba(0, 0, 0, 0.4); } .mast--overlay > div { position: relative; z-index: 5; } .mast-page { background-repeat: no-repeat; background-position: center; background-size: cover; } /*--------------------------------- --Masthead ----------------------------------- */ .mast-page { background-image: url(https://unsplash.it/g/1900/1100?image=436); } .mast-page__content { text-align: center; } .mast-page__content h1 { font-size: 2em; font-weight: 700; color: #fff; font-family: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow: 0px 8px 10px rgba(0, 0, 0, 0.05); } @media (min-width: 58em) { .mast-page__content h1 { font-size: 5vw; } } .mast-page__content p { color: #fff; } @media (min-width: 58em) { .mast-page__content p { font-size: 2vw; } } $(".js-menu-toggle").click(function (e) { $("body").toggleClass("js-menu--is-open"); e.preventDefault(); }); /*---------------------------------------------- --Web font loader ----------------------------------------------- */ WebFontConfig = { google: { families: [ "Montserrat:400,700:latin", "Source Serif Pro", "Roboto Condensed:300,400" ] } }; (function () { var wf = document.createElement("script"); wf.src = ("https:" == document.location.protocol ? "https" : "http") + "://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"; wf.type = "text/javascript"; wf.async = "true"; var t = document.getElementsByTagName("script")[0]; t.parentNode.insertBefore(wf, t); })(); Навигация по записям Animated menu Adaptive collapse