文件文件位置:
- source\js\main.js
- source\css_layout\nav.styl
- head.styl
修改内容:对于导航和小工具挡住了以下代码添加了initial、middle、ends
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| ………… if (isInViewPortOfOneNoDis(pageBottomDomFlag || percentage > 90) && currentTop > 20) { $navTotop.classList.add("long"); $percentBtn.textContent = "返回顶部"; document.querySelector("#page-name").className='ends'; document.querySelector("#menus").className='ends'; } else { $navTotop.classList.remove("long"); $percentBtn.textContent = percentage; document.querySelector("#page-name").className='middle'; document.querySelector("#menus").className='middle' } if (currentTop <= 5) { requestAnimationFrame(() => { document.querySelector("#page-name").className='initial'; document.querySelector("#menus").className='initial';
$header.classList.remove("nav-fixed"); $header.classList.remove("nav-visible"); …………
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| ………… @media screen and (max-width: 1390px) /* #nav padding 0 1.5rem */ #nav .mask-name-container padding 0 1.5rem div#menus padding 0 1.5rem /* 增加 *\ div.initial left 0px !important div.middle left -20px !important div.ends left -50px !important …………
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| ………… &.nav-fixed #name-container z-index: 101; transition: 0.3s; top: 10px;
|