设置对话框样式

2 篇文章 0 订阅
           <div
              v-for="(item, index) in transText"
              :key="index"
              style="overflow: hidden; padding-top:10px;"
            >
              <div
                v-if="item.callerText"
                :class="['avatar', item.callerType == 1 ? '' : 'aright']"
              ></div>
              <div
                :class="item.callerType == 1 ? 'left' : 'right '"
                v-if="item.callerText"
              >
                <p v-html="item.callerText"></p>
              </div>
            </div>
.talk2 {
  // fix
  font-size: 12px;
  width: 100%;
  padding: 15px 0;
  .avatar {
    float: left;
    width: 40px;
    height: 40px;
    background-image: url("../../assets/images/01.png");
    background-size: 40px;
  }

  .aright {
    float: right;
    background-image: url("../../assets/images/02.png");
  }
  .right {
    position: relative;
    min-height: 10px;
    display: table;
    /*使左右的对话框分开*/
    float: right;
    max-width: 78%;
    margin: 0 5px;
    background: rgba(45, 183, 245, 0.3);
    border: 1px solid #2db7f5;
    box-sizing: border-box;
    border-radius: 16px 16px 0px 16px;
  }

  .left {
    position: relative;
    min-height: 10px;
    display: table;
    /*使左右的对话框分开*/
    float: left;
    max-width: 78%;
    margin: 0 5px;
    background: #edf8f3;
    border: 1px solid #74c284;
    box-sizing: border-box;
    border-radius: 16px 16px 16px 0px;
  }

  .left > p,
  .right > p {
    /*使内容居中*/
    display: table-cell;
    vertical-align: middle;
    padding: 10px 14px;
    height: 20px;
    line-height: 18px;
    max-width: 280px;
    position: relative;
  }

  .right > p {
    color: #000;
  }

  .left:before {
    border-right: 8px solid #fff;
    left: -16px;
  }

  .right:after {
    border-left: 8px solid #9eea6a;
    right: -16px;
  }
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值