_suggest.scss 6.26 KB
@import "compass/layout";

$suggest: sprite-map("me/suggest/*.png",$spacing: 5px);

.yoho-suggest-page {
    width: 100%;
    height: auto;

    // 意见反馈头部
    .suggest-header {
        text-align: center;
        color: #fff;
        font-size: pxToRem(26px);
        line-height: pxToRem(46px);
        overflow: hidden;
        padding-bottom: pxToRem(20px);

        @include background-image(linear-gradient(#383838, #505050));

        &:before {
            content: '';
            display: block;

            @include rem-sprite($suggest, suggest-logo);
            width: pxToRem(image_width(sprite-file($suggest, suggest-logo)));
            height: pxToRem(image_height(sprite-file($suggest, suggest-logo)));

            margin: pxToRem(10px) auto pxToRem(15px) auto;
        }
    }

    //意见反馈主体
    .suggest-content {
        border-top: pxToRem(30px) solid #fff;

        .suggest-item {
            width: 100%;
            color: #444;
            border-top: 1px solid #e0e0e0;
            border-bottom: pxToRem(30px) solid #f0f0f0;

            > img {
                display: block;
                overflow: hidden;
                width: 100%;
            }

            > h2 {
                font-size: pxToRem(38px);
                margin: pxToRem(30px) 0 pxToRem(42px - 11px) 0;
                padding: 0 pxToRem(35px);
            }

            > p {
                font-size: pxToRem(26px);
                line-height: pxToRem(48px);
                padding: 0 pxToRem(35px);
            }

            .suggest-type {
                margin-top: pxToRem(29px - 11px);
                height: pxToRem(88px);
                line-height: pxToRem(88px);
                border-top: 1px solid #e0e0e0;
                border-bottom: 1px solid #e0e0e0;
                color: #b0b0b0;
                font-size: pxToRem(26px);
                display: none;

                > div {
                    width: 50%;
                    float: left;
                    text-align: left;
                    padding-left: pxToRem(128px);
                    @include box-sizing();

                    &.active {
                        color: #444;

                        > span {
                            display: inline-block;
                            height: 100%;
                            overflow: hidden;

                            &:nth-of-type(1) {
                                @include rotate(180deg);
                                @include transition(transform .5);
                            }
                        }
                    }

                    &:nth-last-of-type(1) {
                        padding-left: pxToRem(0);
                        padding-right: pxToRem(128px);
                        text-align: right;
                        float: right;
                    }
                }

                &.active {
                    text-align: center;
                    color: #444;
                }
            }
        }
    }

    //发表意见
    .create-new-suggest {
        display: block;
        color: #444;
        width: 100%;
        height: pxToRem(88px);
        line-height: pxToRem(88px);
        text-align: center;
        font-size: pxToRem(30px);
        border-top: 1px solid #e0e0e0;
        border-bottom: 1px solid #e0e0e0;

        > span {
            color: #b0b0b0;
            font-size: pxToRem(26px);
        }
    }
}

// 提交页面
.yoho-suggest-sub-page {
    width: 100%;
    //height: 100%;
    background: #f0f0f0;

    .suggest-sub-form {
        background: #fff;
        width: 100%;

        #suggest-textarea {
            @include box-sizing();
            width: 100%;
            max-width: 100%;
            min-width: 100%;
            height: pxToRem(255px);
            max-height: pxToRem(255px);
            min-height: pxToRem(255px);
            padding: pxToRem(30px);
            font-size: pxToRem(26px);
            line-height: pxToRem(48px);
            //color: #b0b0b0;
            color: #000;
            display: block;
            background: #fff;
            border: none;
            outline: none;
        }

        .img-form {
            padding: 0 pxToRem(30px);

            .upload-img-list {
                float: left;

                > li {
                    display: block;
                    width: pxToRem(130px);
                    height: pxToRem(130px);
                    overflow: hidden;
                    float: left;
                    margin-right: pxToRem(30px);

                    > img {
                        display: block;
                        width: 100%;
                        height: 100%;
                        overflow: hidden;
                    }
                }
            }

            .img-add {
                display: block;
                width: pxToRem(130px);
                height: pxToRem(130px);
                border: 1px dashed #e0e0e0;
                position: relative;
                text-indent: -1000px;
                float: left;

                &:after {
                    $width: pxToRem(image_width(sprite-file($suggest, suggest-add)));
                    $height: pxToRem(image_height(sprite-file($suggest, suggest-add)));
                    content: '';
                    display: block;

                    @include rem-sprite($suggest, suggest-add);
                    width: $width;
                    height: $height;

                    position: absolute;
                    top: 50%;
                    left: 50%;
                    margin-top: -$height / 2;
                    margin-left: -$width / 2;
                }

                input[type="file"],  {
                    position: absolute;
                    //@include stretch();
                    @include opacity(0.2);
                    border: none;
                    outline: none;
                    display: block;

                    width: pxToRem(130px);
                    height: pxToRem(130px);

                    top: 0;
                    left: 0;
                }
            }
        }
    }
}