_message.css 3.71 KB
.service-chat {
    /* 聊天气泡 */
    .head-icon {
        height: 90px;
        width: 90px;
        background: green;
        border-radius: 50%;
    }

    .chat-info {
        position: relative;
        overflow: hidden;

        span {
            display: inline-block;
            padding: 25px 35px;
            font-size: 28px;
            word-break: break-all;
            border-radius: 10px;
        }

        span.image {
            padding: 15px;
        }

        .chat-image {
            max-width: 520px;
            max-height: 540px;
        }
    }

    .fake-img-wrap {
        display: none;
        position: fixed;
        top: 0;
        bottom: 0;
        width: 100%;
        background: #000;
        z-index: 9;
        overflow: hidden;

        img {
            display: inline-block;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            max-width: 100%;
            max-height: 100%;
        }
    }

    .msg-wrap {
        overflow: hidden;
        margin-bottom: 30px;
    }

    .send-msg {
        text-align: right;

        span {
            margin: 0 12px 0 0;
            background: #fff;
            color: #444;
            max-width: 90%;

            &:after {
                content: "";
                position: absolute;
                display: inline-block;
                width: 0;
                height: 0;
                font-size: 0;
                border: 10px solid;
                border-radius: 2px;
                top: 0;
                right: 0;
                border-color: #fff transparent transparent #fff;
            }
        }

        .head-icon {
            float: right;
        }

        .send-status {
            display: inline-block;
            height: 30px;
            width: 30px;
            font-size: 28px;
            line-height: 30px;
            text-align: center;
            border-radius: 50%;
        }

        .send-fail {
            background: #ff575c;
            color: #fff;
        }

        .send-loading {
            color: transparent;
            background-image: resolve("service/chat/loading.gif");
            background-size: 100% 100%;
        }
    }

    .recevied-msg {
        .head-icon {
            float: left;
        }

        span {
            margin: 0 0 0 10px;
            background: #888;
            color: #fff;

            &:before {
                content: "";
                position: absolute;
                display: inline-block;
                width: 0;
                height: 0;
                font-size: 0;
                border: 10px solid;
                border-radius: 2px;
                top: 0;
                left: 0;
                border-color: #888 #888 transparent transparent;
            }
        }
    }

    /* 网络连接失败 */
    .connection-failed {
        position: absolute;
        top: 105px;
        left: 0;
        text-align: center;
        height: 70px;
        width: 100%;
        line-height: 70px;
        color: #fff;
        background: rgba(255, 0, 0, 0.5);
        z-index: 1;
    }

    /* 时间 */
    .chat-time {
        text-align: center;
        font-size: 24px;
        color: #b0b0b0;
        margin-bottom: 20px;
    }

    /* 客服留言 */
    .leave-msg-wraper,
    .change-mm {
        text-align: center;
        margin-bottom: 20px;
    }

    .leave-msg {
        display: inline-block;
        padding: 15px 35px;
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid transparent;
        outline: none;
        border-radius: 5px;
        color: #fff;
        font-size: 24px;
        overflow: hidden;

        a {
            color: #4a90e2;
        }
    }
}