_style-icon.css 2.21 KB
.style-icon-container {
    $width: 221px;
    $height: 320px;
    $space: 15px;
    $buttonWidth: 140px;

    @extend .resource-container;

    .smooth-card-container {
        width: 1170px;
        height: $height;
        margin: 0 auto;
        overflow: hidden;
    }

    .card {
        height: $height;
        width: calc($width + $space);
        float: left;
        position: relative;
        box-sizing: border-box;

        .img {
            width: $width;
            height: 100%;
            float: left;
            margin-right: $space;
            background-size: 100% 100%;
            background-position: center center;
        }

        &.last {
            .img {
                margin-right: 0;
            }
        }

        .brand-text-box {
            $size: 14px;
            $line-height: 1.4;
            $lines-to-show: 3;

            width: 0;
            border: none;
            padding-top: 35px !important;
            padding-bottom: 50px !important;
            background: #f5f7f6;

            p {
                height: calc($size*$line-height*$lines-to-show);
                width: calc($width-2*$space);
                margin: 15px 0;
                padding-right: $space;
                font-size: $size;
                line-height: $line-height;
                overflow: hidden;
                -webkit-line-clamp: $lines-to-show;
                -webkit-box-orient: vertical;
                color: #505050;
            }

            button {
                width: 120px;
                left: 20px;
                font-family: "微软雅黑" !important;
                background-color: #f5f7f6;
            }

            p,
            h4 {
                display: none;
            }
        }

        &.active {
            width: calc($width*2+$space);
            float: left;

            .img {
                margin-right: 0;
            }

            .brand-text-box {
                width: $width;
                height: 100%;
                float: left;
                padding: 25px 0 25px $space;

                p,
                h4 {
                    display: block;
                    display: -webkit-box;
                }
            }
        }
    }
}