聊天界面如图所示

HTML一代能干的耳机/p chat实用储物柜/p

this消息on the left!

this消息on the right!

this is a long消息! this is a long消息! this is a long left消息!

this消息on the right!

this is a long消息! this is a long消息! this is a long left消息!

发送

CSS一代智能耳机/p /*

author : Wang https://blog.csdn.net/q 475254344

最后修改: 2018/5/15

body {

padding: axdxxm;

margin: axdxxm;

}

沥{

列表样式: none;

}

输入{

border-radius: cxddy;

}

. leftbar ul {

padding: axdxxm;

}

. leftbar li {

padding: 1axdxxm;

}

. leftbar {

背景色: # 212 e3e;

width: 5axdxxm;

height: 100%;

color:grey;

padding: axdxxm;

文本对齐3360中心;

位置: absolute;

}

. container {

height: 100%;

width: 100%;

背景:线性梯度(#1f94bf 0、#edf5f8 0、#edf5f8 80%、#1f94bf 0);

显示: Flex;

margin: 0;

}

. chatbox {

margin :自动;

height: 70%;

width: 70%;

变换:变换y (-10 %;

box-shadow: 0 0 0 1px gray;

显示: Flex;

}

. chatleft {

背景色: # ffffff;

width: 25%;

left: 0;

height: 100%;

}

. chatleft .top {

height: 10%;

color: grey;

背景色: # f7f9f 9;

显示: Flex;

align-items3360中心;

填充- left :2axdx XM;

}

. searchbtn {

height: 36px;

width: 36px;

border-radius: 18px;

背景色: #1f 94 BF;

color: #ECF0F1;

玛格琳- left :1axdx XM;

}

. searchbtn:hover {

cursor: pointer;

}

. chatleft .center {

overflow-y: scroll;

height: 90%;

}

. chatleft .center ul{

padding-left: 1axdxxm;

}

. chatleft .center li{

margin: 1axdxxm;

}

. chatright {

背景色: # ffffff;

width: 75%;

height: 100%;

}

. chatright .top {

height: 10%;

显示: Flex;

align-items3360中心;

padding-left: 3axdxxm;

}

. chatright .center {

背景色: # edf5f 8;

height: 65%;

overflow-y: scroll;

}

. chatright .center ul {

padding: 1axdxxm;

}

. chatright .center li {

margin: 1axdxxm;

width: 100%;

}

. chatright .center p{

display :在线区块;

}

. msgcard {

margin: 0 1axdxxm 0 1axdxxm;

背景色: white;

border-radius: 1axdxxm;

padding: 1axdxxm;

最大窗口: 60 %;

}

. msgleft {

浮点:左;

}

. msgright {

/*浮动3360 right; */

}

. chatright .footer {

height: 25%;

背景色: # fbf CFC;

文本对齐: right;

}

. sendbtn {

高:4axdx XM;

width: 8axdxxm;

border-radius: 1axdxxm;

背景色: # 58 d 68d;

color:白色;

字体权重: bold;

margin:1axdxxm 2axdxxm 0 0;

}

导入HTML时对应的CSS路径只要自己修改就可以使用

请说明出处