filter.scss 2.68 KB
.filter-nav {
    background-color: #fff;
    border-top: 2px solid #fff;
    border-bottom: 1px solid #e6e6e6;

    > li {
        float: left;
        width: 25%;
        height: 66px;
        line-height: 66px;
        text-align: center;
        color: #999;
    }

    .bytouch {
        background: #eee;
    }

    a {
        display: inline-block;
        box-sizing: border-box;
        width: auto;
        height: 100%;
        color: #999;
    }

    .active > a {
        color: #000;
        box-sizing: border-box;
    }

    .active > .iconfont {
        color: #000;

        &.cur {
            color: #000;
        }

        &.drop {
            color: #000;
        }
    }

    .filter .iconfont {
        font-size: 24px;
        transition: transform 0.1 ease-in;
    }

    .filter.active .iconfont {
        transform: rotate(-180deg);
    }
}

.filter-mask,
.filter-body {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 2;
}

.filter-mask {
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
}

.filter-body {
    height: 1000px;
    background: #fff;
    color: #000;
    font-size: 28px;
    cursor: pointer;

    .classify {
        width: 50%;
        height: 100%;
        background: #f8f8f8;

        > li {
            height: 120px;
            line-height: 120px;

            > * {
                box-sizing: border-box;
            }

            &.active {
                background: #fff;
            }

            .shower {
                overflow: hidden;
                padding-left: 40px;
                width: 100%;
                color: #333;
                text-overflow: ellipsis;
                white-space: nowrap;

                &.highlight {
                    background: #eee;
                }
            }

            .default {
                color: #999;
            }

            .title {
                float: left;
                color: #000;
            }
        }
    }

    .sub-classify {
        position: absolute;
        top: 0;
        left: 50%;
        display: none;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        width: 50%;
        height: 880px;

        > li {
            overflow: hidden;
            padding-left: 30px;
            height: 120px;
            border-bottom: 1px solid #e6e6e6;
            text-overflow: ellipsis;
            white-space: nowrap;
            line-height: 120px;

            &.highlight {
                background: #eee;
            }
        }

        .chosed-icon {
            display: none;
        }

        .chosed .chosed-icon {
            display: inline;
        }
    }

    .active > .sub-classify {
        display: block;
    }
}