jquery实现全屏滚动切换导航效果代码

代码语言:html

所属分类:菜单导航

代码描述:jquery实现全屏滚动切换导航效果代码

代码标签: 滚动 切换 导航 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<html >
<head>
    <style>
        *, *:before, *:after {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        .inner, .nav-panel ul .nav-btn:after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
        }

        html, body {
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

@media (max-width: 767px) {
            body {
                font-size: 70%;
            }
        }

        .wrapper {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            transition: transform 1.5s;
            perspective: 3000;
            transform-style: preserve-3d;
        }
        .wrapper .page {
            position: relative;
            width: 100%;
            height: 100%;
            transform: rotateX(180deg) scale(0.3);
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            transition: transform 1s ease-in-out;
            will-change: transform;
        }
        .wrapper .page h2 {
            color: #fff;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translateX(-50%) translateY(-50%);
            text-transform: uppercase;
            font-size: 3em;
        }
        .wrapper .page.page1 {
            background-color: #66a6b8;
            background-image: linear-gradient(10deg,#66a6b8 20%, #5471B9 80%);
        }
        .wrapper .page.page2 {
            background-color: #f29c54;
            background-image: linear-gradient(45deg,#f29c54 0%, #DB4367 100%);
        }
        .wrapper .page.page3 {
            background-color: #23af56;
            background-image: linear-gradient(135deg,#23af56 0%, #67A79A 100%);
        }
        .wrapper .page.page4 {
            background-color: #412F2F;
            background-image: linear-gradient(160deg,#412F2F 15%, #6B2686 85%);
        }
        .wrapper.active-page1 {
            transform: translateY(0%);
        }
        .wrapper.active-page1 .page.page1 {
            transform: scale(1);
        }
        .wrapper.active-page2 {
            transform: translateY(-100%);
        }
        .wrapper.active-page2 .page.page2 {
            transform: scale(1);
        }
        .wrapper.active-page3 {
            transform: translateY(-200%);
        }
        .wrapper.active-page3 .page.page3 {
            transform: scale(1);
        }
        .wrapper.active-page4 {
            transform: translateY(-300%);
        }
        .wrapper.active-page4 .page.page4 {
            transform: scale(1);
        }
        .wrapper.active-page5 {
            transform: translateY(-400%);
        }
        .wrapper.active-page5 .page.page5 {
            transform: scale(1);
        }
        .wrapper.active-page6 {
            transform: translateY(-500%);
        }
        .wrapper.active-page6 .page.page6 {
            transform: scale(1);
        }
        .wrapper.active-page7 {
            transform: translateY(-600%);
        }
        .wrapper.active-page7 .page.page7 {
            transform: scale(1);
        }
        .wrapper.active-page8 {
            transform: translateY(-700%);
        }
        .wrapper.active-page8 .page.page8 {
            transform: scale(1);
        }
        .wrapper.active-page9 {
            transform: translateY(-800%);
        }
        .wrapper.active-page9 .page.page9 {
            transform: scale(1);
        }
        .wrapper.active-page10 {
            transform: translateY(-900%);
        }
        .wrapper.active-page10 .page.page10 {
            transform: scale(1);
        }

        .nav-panel {
            position: fixed;
            top: 50%;
            right: 2%;
            transform: translateY(-50%);
            z-index: 1000;
            transition: opacity 0.5s, transform 0.5s cubic-bezier(0.57, 1.2, 0.68, 2.6);
            will-change: transform, opacity;
        }
        .nav-panel.invisible {
            opacity: 0;
            transform: translateY(-50%) scale(0.5);
        }
        .nav-panel ul {
            list-style-type: none;
        }
        .nav-panel ul .nav-btn {
            position: relative;
            overflow: hidden;
            width: 1em;
            height: 1em;
            margin-bottom: 0.5em;
            border: 0.12em solid #fff;
            border-radius: 50%;
            cursor: pointer;
            transition: border-color, transform 0.3s;
            will-change: border-color, transform;
        }
        .nav-panel ul .nav-btn:after {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            transform: translateX(-50%) translateY(-50%) scale(0.3);
            background-color: #fff;
            opacity: 0;
            transition: transform, opacity 0.3s;
            will-change: transform, opacity;
        }
        .nav-panel ul .nav-btn.active:after, .nav-panel ul .nav-btn:hover:after {
            transform: translateX(-50%) translateY(-50%) scale(0.7);
            opacity: 1;
        }
        .nav-panel ul .nav-btn:hover {
            border-color: yellow;
            transform: scale(1.2);
        }
        .nav-panel ul .nav-btn:hover:after {
            background-color: yellow;
        }
        .nav-panel .scroll-btn {
            position: absolute;
            left: 0;
            width: 1em;
            height: 1em;
            border: 0.2em solid #fff;
            border-left: none;
            border-bottom: none;
            cursor: pointer;
            transform-origin: 50% 50%;
            transition: border-color 0.3s;
        }
        .nav-panel .scroll-btn.up {
            top: -1.6em;
            transform: rotate(-45deg);
        }
        .nav-panel .scroll-btn.down {
            bottom: -1.2em;
            transform: rotate(135deg);
        }
        .nav-panel .scroll-btn:hover {
            border-color: yellow;
        }

        .check-out {
            position: absolute;
            bottom: 1rem;
            left: 50%;
            transform: translateX(-50%);
            font-size: 2rem;
            color: #fff;
        }
        .check-out a {
 .........完整代码请登录后点击上方下载按钮下载查看

网友评论0