html怎么实现聊天界面设计,纯css制作仿微信聊天页面

纯css制作仿微信聊天页面

*{

margin: 0;

padding: 0;

}

body{

font-size: 14px;

}

.triangle{

margin: 100px auto ;

width: 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("images/tx1.jpg");

box-sizing: border-box;

position: relative;

left: -10px;

top: 9px;

}

.triangle li.textLeft span:before{

content: "";

display: block;

width: 0;

height: 0;

border: 8px solid transparent;

border-right: 8px solid white;

position: absolute;

top: 8px;

left: -16px;

}

.triangle li.textRight:after{

content: url("images/tx2.jpg");

box-sizing: border-box;

position: relative;

right: -10px;

top: 9px;

}

.triangle li.textRight span:after{

content: "";

display: block;

width: 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;

}

仿微信聊天界面


  • 你好

  • 你好

  • 在干嘛

  • 玩手机

  • 出去玩啊

  • 好的

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值