_detail.scss 7.37 KB
$pageContentWidth: 1080px;
$detialContentWidth: 740px;
$sideWidth: 290px;
.detail-wrap {
    width: $pageContentWidth;
    margin: 0 auto;
}

.detail-title {
    margin: 48px 0 28px;
    width: 644px;
    font-size: 28px;
    h2 {
        line-height: 40px;
        font-weight: bold;
    }
    .item-info {
        $itemInfoHeight: 20px;
        height: $itemInfoHeight;
        line-height: $itemInfoHeight;
        margin: 26px 0 0;
        font-size: 12px;
        .item-tag {
            display: inline-block;
            width: auto;
            height: auto;
            padding: 0 11px;
            background: #000;
            line-height: $itemInfoHeight;
            color: #fff;
        }
        .brand-info {
            background: #1a72ff;
        }
        .activity-intro {
            background-color: #ffc000;
        }
        .spotlight-activity {
            background-color: #ff365c;
        }
        .limited-edition {
            background-color: #21dbcc;
        }
        .item-time {
            margin: 0 0 0 20px;
            color: #b2b2b2;
            font-size: 12px;
            background: #fff;
        }
    }
}

.detail-body {
    float: left;
    width: $detialContentWidth;
    img {
        max-width: 100%;
    }
}

.detail-slide {
    margin-bottom: 20px;
}

.detail-slide-body {
    $slideBodyHeight: 425px;
    position: relative;
    width: 100%;
    height: $slideBodyHeight;
    overflow: hidden;
    .detail-slide-piclist {
        height: $slideBodyHeight;
        overflow: hidden;
        position: relative;
        .box {
            float: left;
            width: $detialContentWidth;
            height: $slideBodyHeight;
            line-height: $slideBodyHeight;
            position: relative;
            background: #000;
            text-align: center;
            img {
                max-width: 100%;
                vertical-align: middle;
            }
        }
    }
}

.slide-shadow {
    a {
        position: absolute;
        width: 50px;
        top: 0;
        bottom: 0;
        &:focus {
            outline: none;
        }
    }
    .slide-shadow-prev {
        left: 0;
    }
    .slide-shadow-next {
        right: 0;
    }
}

.detail-slide-big-ctrl {
    a {
        display: none;
        position: absolute;
        font-size: 40px;
        top: 50%;
        color: #fff;
        margin-top: -30px;
        z-index: 20;
        &:focus {
            outline: none;
        }
    }
    .slide-big-ctrl-prev {
        left: 5px;
    }
    .slide-big-ctrl-next {
        right: 5px;
    }
}

.detail-slide-ctrl {
    $slideCtrlHeight: 86px;
    padding: 15px 0 0 0;
    width: 100%;
    height: $slideCtrlHeight;
    overflow: hidden;
    position: relative;
    .detail-slide-ctrl-prev,
    .detail-slide-ctrl-next {
        display: none;
        position: absolute;
        top: 15px;
        width: 30px;
        height: $slideCtrlHeight;
        line-height: $slideCtrlHeight;
        font-size: 18px;
        text-align: center;
        color: #fff;
    }
    .detail-slide-ctrl-prev {
        left: 0;
    }
    .detail-slide-ctrl-next {
        right: 0;
    }
}

.detail-slide-ctrl-tabs {
    $slideCtrlHeight: 86px;
    position: relative;
    left: 0;
    top: 0;
    li {
        position: relative;
        float: left;
        img {
            display: block;
            width: 147px;
            height: $slideCtrlHeight;
        }
        .cover {
            position: absolute;
            left: 0px;
            right: 0px;
            top: 0px;
            bottom: 0px;
            background: rgba(0, 0, 0, 0.5);
        }
    }
    li.current,
    li.swiper-slide-active {
        .cover {
            background: rgba(0, 0, 0, 0);
        }
    }
}

.text-body {
    margin: 0 0 25px 0;
    font-size: 14px;
    line-height: 28px;
    color: #000;
    p {
        margin: 0 0 25px;
    }
    a {
        color: #000;
        text-decoration: underline;
    }
}

.related-post {
    h3 {
        font-weight: bold;
    }
    .post-list {
        $itemWidth: 235px;
        margin-top: 17px;
        width: $detialContentWidth;
        .layout-item {
            float: left;
            width: 235px;
            height: 230px;
            margin: 0 ($detialContentWidth - $itemWidth * 3) / 2 0 0;
            .image-box {
                width: $itemWidth;
                height: 135px;
                overflow: hidden;
                a {
                    display: table-cell;
                    width: $itemWidth;
                    height: 135px;
                    vertical-align: middle;
                    img {
                        margin: 0 auto;
                    }
                }
            }
            .content {
                .volupia {
                    margin: 22px 0 0 0;
                    line-height: 20px;
                    a {
                        font-size: 16px;
                        font-weight: bold;
                    }
                }
                .time {
                    margin: 22px 0 0;
                    color: #b2b2b2;
                    font-size: 12px;
                }
            }
        }
        .layout-item:last-child {
            margin: 0;
        }
    }
}

.detail-related-post {
    margin: 100px 0 80px 0;
    h3 {
        font-size: 16px;
        font-weight: bold;
        width: 4em;
        border: 1px solid #000;
        padding: .8em 7.3em;
        margin: 0 auto;
    }
    hr {
        margin: 32px 0 40px 0;
        border: 0;
        border-top: 1px solid #e3e3e3;
    }
}

.detail-side {
    width: $sideWidth;
    float: left;
    margin: 0 0 0 50px;
    padding-bottom: 62px;
}

.detail-ad {
    width: $sideWidth;
    li {
        margin-bottom: 30px;
        img {
            width: 100%;
            display: block;
            max-width: 100%;
        }
    }
}

.side-related-post.fix {
    position: fixed;
    top: 0px;
    left: 50%;
    width: 280px;
    margin-left: 210px;
}

.side-related-tab {
    margin: 50px 0 20px 0;
    border: 1px solid #000;
    a {
        float: left;
        width: 140px;
        text-align: center;
        font-size: 14px;
        opacity: 0.72;
        height: 48px;
        line-height: 48px;
        color: #000;
        font-weight: bold;
    }
    span {
        float: left;
    }
    a.current {
        opacity: 1;
    }
}

.side-related-list {
    width: $sideWidth;
    display: none;
    &.current {
        display: block;
    }
    .layout-item {
        width: $sideWidth;
        height: 95px;
        float: none;
        margin: 0;
        .image-box {
            float: left;
            width: 92px;
            height: 54px;
            overflow: hidden;
            img {
                display: block;
                width: 100%;
                height: 100%;
            }
            .play-icon {
                width: 20px;
                height: 20px;
                margin: -10px 0 0 -10px;
            }
        }
        .content {
            float: left;
            margin: 0 0 0 16px;
            width: $sideWidth - 92px - 16px;
            h2 {
                margin: 0;
                a {
                    font-size: 14px;
                    font-weight: normal;
                    line-height: 20px;
                }
            }
        }
        hr {
            margin: 20px 0 0;
            float: left;
            width: $sideWidth;
            border: 0;
            border-top: 1px solid #e3e3e3;
        }
    }
}