index.scss 1.79 KB
.side-index {
    position: fixed;
    top: 88px;
    bottom: 0;
    right: 0;
    width: 40px;
    background-color: rgba(255, 255, 255, 0.7);
}

.side-idx {
    position: fixed;
    width: 40px;
    margin: 0;
    padding: 6px 0;
    right: 0;
    z-index: 10;
    top: 50% !important;
    transform: translateY(-50%);

    .bg {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        opacity: 0.7;
        background-color: #fff;
    }

    .zoom-in {
        width: 120px;
        height: 100px;
        color: #fff;
        text-align: center;
        padding-right: 20px;
        line-height: 100px;
        background: url(http://cdn.yoho.cn/yohoblk-wap/2.0.50/img/product/zoom-in-bg.png) no-repeat;
        background-size: contain;
        box-sizing: border-box;
        transition: opacity 0.4s ease;
        opacity: 0;
        font-size: 68px;
        font-family: "PingFang-SC-Medium";
        position: absolute;
        left: -120px;
        top: -35px;

        &.zoom-show {
            opacity: 1;
        }
    
        &.zoom-hide {
            opacity: 0;
        }
    }

    .letter {
        position: relative;
        list-style: none;
        text-align: center;
        width: 100%;
        height: 32px;

        .idx-item {
            color: #000;
            font-size: 24px;
            display: block;
            width: 24px;
            height: 28px;
            line-height: 28px;
            margin: 1px auto;
            font-family: "PingFang-SC-Medium";

            &.zoom {
                background-color: #000;
                border-radius: 50%;
                color: #fff;
                width: 28px;
                height: 28px;
                line-height: 28px;
                text-align: center;
            }
        }
    }
}