_home.css 5.55 KB
.home-page {
    $sliderHeight: 645px;

    margin: 10px auto 0;

    .top-slider-container {
        height: $sliderHeight;
    }

    .slide-container {
        position: absolute;
        left: 0;
        right: 0;
        height: $sliderHeight;
    }

    .slide-thumb-container {
        height: 510px;
    }

    .slide-wrapper {
        position: relative;
        height: $sliderHeight;
        overflow: hidden;

        ul {
            position: relative;
            height: 100%;
        }

        &:hover .slide-switch.show {
            display: block;
        }

        li {
            display: none;
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 100%;

            a {
                display: block;
                height: 100%;
                width: 100%;
                margin: 0 auto;
            }

            &:first-child {
                display: block;
            }

            /* center the image. refer to http://stackoverflow.com/questions/24650218/image-in-full-screen-with-img-tag */
            img {
                min-height: 100%;
                min-width: 1920px;
                height: auto;
                width: auto;
                position: absolute;
                top: -100%;
                bottom: -100%;
                left: -100%;
                right: -100%;
                margin: auto;
            }
        }
    }

    .slide-container-placeholder {
        height: $sliderHeight;
        width: 100%;

    }

    .slide-thumb-container-placeholder {
        height: 510px;
    }

    .slide-switch {
        display: block;

        a {
            position: absolute;
            top: 50%;
            margin: -30px 0 0;
            width: 40px;
            height: 70px;
            line-height: 70px;
            text-align: center;
            z-index: 2;
            background: #000;
            opacity: 0.55;

            &.prev {
                left: 50%;
                margin-left: -615px;
            }

            &.next {
                right: 50%;
                margin-right: -615px;
            }

            &:hover {
                opacity: 0.9;
            }

            .iconfont {
                font-size: 34px;
                color: #fff;
            }
        }
    }

    .thumb-pagination {
        width: 1148px;
        margin: 6px auto 0;
        padding-left: 2px;

        li {
            position: relative;
            float: left;
            margin-left: 6px;
            width: 138px;
            height: 54px;

            &:first-child {
                margin: 0;
            }

            &.focus a {
                opacity: 0;
            }

            a {
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                top: 0;
                background: #000;
                opacity: 0.3;
            }

            img {
                width: 100%;
                height: 100%;
            }
        }
    }

    /* 大banner圆点 */
    .slide-pagination {
        font-size: 0;

        .slide-shade {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
        }

        span {
            position: relative;
            display: inline-block;
            margin: 0 3px;
            width: 9px;
            height: 9px;
            background: #ccc;
            cursor: pointer;
            z-index: 2;

            &.focus {
                width: 16px;
                height: 16px;
                position: relative;
                top: 3px;
                background: #fff;
            }
        }
    }

    .debris-slider {
        height: 510px;
        width: 100%;

        .col {
            float: left;

            a {
                display: block;
            }
        }

        .left-col a,
        .right-col a {
            margin-bottom: 10px;

            &:last-child {
                margin-bottom: 0;
            }
        }

        .right-col img,
        .left-col img {
            height: 100%;
            width: 100%;
        }

        .left-col {
            margin-right: 10px;

            a {
                width: 280px;
                height: 120px;
            }

            a:first-child {
                height: 250px;
            }
        }

        .center-col {
            position: relative;
            width: 570px;
            height: 100%;
            margin-right: 10px;
            font-size: 0;

            &:hover {
                .slide-switch.show {
                    display: block;
                }
            }

            .slide-wrapper {
                height: 100%;

                a {
                    width: 100%;
                }
            }

            .slide-switch {
                a.prev {
                    left: 0;
                    margin-left: 0;
                }
                a.next {
                    right: 0;
                    margin-right: 0;
                }
            }

            img {
                max-width: 100%;
                max-height: 100%;
            }
        }

        .right-col a {
            width: 280px;
            height: 120px;
        }

        .right-col a:first-child {
            height: 380px;
            margin-bottom: 11px;
        }
    }

    .floor-header {
        height: 90px;
        line-height: 1.4;
        font-size: 16px;
    }

    .main-container {
        position: relative;
        top: -60px;
        margin: 0 auto;
        box-sizing: border-box;
    }
}