_side-nav.scss 4.32 KB
.side-nav {
    display: none;
    background: #fff;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 100rem / $pxConvertRem;
    width: 540rem / $pxConvertRem;
    overflow: hidden;
    @include transition(all .3s);

    ul {
        background: #f0f0f0;
    }

    li {
        position: relative;
        height: 128rem / $pxConvertRem;
        line-height: 128rem / $pxConvertRem;
        border-bottom: 1px solid #e0e0e0;
        background: #fff;

        a {
            display: block;
            height: 100%;
            padding-left: 110rem / $pxConvertRem;
            color: #444;
            font-size: 24rem / $pxConvertRem;
        }

        .nav-icon, .nav-img {
            position: absolute;
            width: 60rem / $pxConvertRem;
            height: 60rem / $pxConvertRem;
            top: 50%;
            margin-top: -30rem / $pxConvertRem;
            left: 24rem / $pxConvertRem;
            background: no-repeat left center;
            background-size: 100% 100%;
        }

        .enter-subnav {
            position: absolute;
            right: 30rem / $pxConvertRem;
            top: 0;
            bottom: 0;
            font-size: 36rem / $pxConvertRem;
            color: #b0b0b0;
            font-weight: lighter;
        }

        em {
            margin-right: 10rem / $pxConvertRem;
            font-weight: bold;
            font-size: 34rem / $pxConvertRem;
        }
    }

    li.boys {
        i {
            background: image-url("side-nav/boys.png") no-repeat left center;
            background-size: 100% 100%;
        }
    }

    li.girls {
        i {
            background: image-url("side-nav/girls.png") no-repeat left center;
            background-size: 100% 100%;
        }
    }

    li.kids {
        i {
            background: image-url("side-nav/kids.png") no-repeat left center;
            background-size: 100% 100%;
        }
    }

    li.life {
        i {
            background: image-url("side-nav/life.png") no-repeat left center;
            background-size: 100% 100%;
        }
    }

    li.new {
        margin: (19rem / $pxConvertRem) 0 0;
        border-top: 1px solid #e0e0e0;

        a {}

        i {
            background: image-url("side-nav/new.png") no-repeat left center;
            background-size: 100% 100%;
        }
    }

    li.guang, li.trendfinder {
        .nav-icon {
            background: image-url("side-nav/guang.png") no-repeat left center;
            background-size: 100% 100%;
        }
    }
}

.side-nav.on {
    display: block;
}

.sub-nav {
    display: none;
    position: fixed;
    bottom: 0;
    top: 0;
    left: 0;
    width: 540rem / $pxConvertRem;
    background: #fff !important;
    overflow: hidden;

    @include transform(translateX(540rem / $pxConvertRem));
    @include transition(transform 0.3s);

    li {
        height: 109rem / $pxConvertRem;
        line-height: 109rem / $pxConvertRem;
        border: none;

        a {
            position: relative;
            display: block;
            margin: 0 0 0 (30rem / $pxConvertRem);
            padding-left: 50rem / $pxConvertRem;
            border-bottom: 1px solid #e0e0e0;
            font-size: 36rem / $pxConvertRem;
            z-index: 2;
        }

        /* img{
            position: absolute;
            max-width: 50rem / $pxConvertRem;
            max-height: 50rem / $pxConvertRem;
            left: 32rem / $pxConvertRem;
            top: 50%;
            margin-top: -25rem / $pxConvertRem;
            border: none;
        } */
        .nav-point {
            position: absolute;
            left: 0rem / $pxConvertRem;
            font-size: 16rem / $pxConvertRem;
            color: #f0f0f0;
        }

        em {
            font-weight: normal;
            font-size: 36rem / $pxConvertRem;
        }
    }

    li:hover, li.current {
        .nav-point {
            color: #3e3e3e;
        }
    }

    li:first-child {
        height: 88rem / $pxConvertRem;
        line-height: 88rem / $pxConvertRem;
        background: #3e3e3e;

        a {
            color: #fff;
            border-bottom: none;
            padding-left: 110rem / $pxConvertRem;
        }

        .nav-back {
            position: absolute;
            left: 0;
        }
    }
}

.sub-nav.show {
    display: block;
    @include transform(translateX(0));
    @include transition(transform 0.3s);
}