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>
  • 相关阅读:
    Qt Qaction和触发函数建立连接的方法
    Qt QChart缩放后坐标轴间隔取整
    Qt 编译时报错“退出,退出代码2”的原因
    Qt Qchart 中清空绘图
    Qt QChartView 如何放入widget
    Qt QChart之曲线图,饼状图,条形图使用
    Qt 实现控件不响应鼠标点击事件
    Qt css样式大全(整理版)
    Qt 加载qss文件
    Qt 如何处理密集型耗时的事情(频繁调用QApplication::processEvents)
  • 原文地址:https://www.cnblogs.com/xiaoxiaoxun/p/13889494.html
Copyright © 2011-2022 走看看