zoukankan      html  css  js  c++  java
  • 聊天记录

     <ul class="chat_ul">
                        <template v-for="(item, index) in chat_logArr">
                            <li class="textLeft" :key="index" v-if="item.create_time">
                                <div class="textLeft_box">
                                    <div style=" 35px; height: 35px; margin-right: 15px">
                                        <img style=" 35px; height: 35px" src="https://placeimg.com/640/480/any" alt="" />
                                    </div>
                                    <div>
                                        <p>{{ item.content }}</p>
                                        <p>{{ item.chat_time }}</p>
                                    </div>
                                </div>
                            </li>
                            <li class="textRight" :key="index" v-if="item.replay_time">
                                <div class="textRight_box clearfix">
                                    <div style="margin-right: 15px; display: flex; margin-right: auto; float: right">
                                        <div style="margin-right: 15px">
                                            <p>{{ item.content }}</p>
                                            <p>{{ item.chat_time }}</p>
                                        </div>
                                        <div>
                                            <img style=" 35px; height: 35px" src="https://placeimg.com/640/480/any" alt="" />
                                        </div>
                                    </div>
                                </div>
                            </li>
                        </template>
                    </ul>
    <style scoped>
    .chat_ul {
        height: 300px;
        overflow: auto;
    }
    .setBox {
        display: flex;
        margin-bottom: 10px;
    }
    .setBox_d {
         60px;
        text-align: right;
        margin-right: 25px;
    }
    body {
        font-size: 14px;
    }
    .triangle {
        margin: 100px auto;
         300px;
        background-color: #ebebe9;
    }
    .triangle ul {
        padding: 10px;
    }
    .triangle li {
        padding: 5px;
        margin-bottom: 10px;
    }
    .triangle li span {
        position: relative;
        border-radius: 7px;
        background-color: #a6e860;
        padding: 6px 10px 8px 10px;
        z-index: 1;
    }
    .triangle .textLeft span {
        background-color: white;
    }
    .triangle li.textLeft:before {
        content: url('https://placeimg.com/640/480/any');
        box-sizing: border-box;
        position: relative;
        left: -10px;
        top: 9px;
    }
    .triangle li.textLeft span:before {
        content: '';
        display: block;
         0;
        height: 0;
        border: 8px solid transparent;
        border-right: 8px solid white;
        position: absolute;
        top: 8px;
        left: -16px;
    }
    .triangle li.textRight:after {
        content: url('https://placeimg.com/640/480/any');
        box-sizing: border-box;
        position: relative;
        right: -10px;
        top: 9px;
    }
    .triangle li.textRight span:after {
        content: '';
        display: block;
         0;
        height: 0;
        border: 8px solid transparent;
        border-left: 8px solid #a6e860;
        position: absolute;
        top: 8px;
        right: -16px;
    }
    li {
        list-style: none;
    }
    .textRight {
        text-align: right;
         100% !important;
    }
    .textLeft_box {
        display: flex;
    }
    /* .textRight_box {
        display: flex;
    } */
    </style>
  • 相关阅读:
    149、你知道空类的大小是多少吗?
    hdoj--2682--Tree()
    hdoj--5053--the Sum of Cube(水)
    Codeforces--602A--Two Bases(水)
    poj--1637--Sightseeing tour(网络流,最大流判断混合图是否存在欧拉图)
    poj--1149--PIGS(最大流经典建图)
    poj--1459--Power Network(最大流,超级源超级汇)
    hdoj--3549--Flow Problem(最大流)
    poj--1237--Drainage Ditches(最大流)
    nyoj--38--布线问题(克鲁斯卡尔)
  • 原文地址:https://www.cnblogs.com/xiaoxiaoxun/p/13889494.html
Copyright © 2011-2022 走看看