js+css实现响应式自适应兼容手机的聊天对话框交互通讯效果代码
代码语言:html
所属分类:响应式
代码描述:js+css实现响应式自适应兼容手机的聊天对话框交互通讯效果代码
代码标签: js css 兼容 手机 响应式 聊天 对话 框 交互 通讯
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
background-color: #673ab7;
}
body,
button,
input,
select {
font-family: Source Sans Pro, sans-serif;
}
.bot-response {
font-size: 17px;
line-height: 24px;
border-radius: 20px;
word-wrap: break-word;
max-width: fit-content;
padding: 15px 17px;
background: rgb(255, 255, 255);
color: rgb(0, 0, 0);
margin-top: 10px;
}
.text[text-first] {
border-bottom-left-radius: 5px;
margin-top: 0;
}
.text[text-middle] {
border-bottom-left-radius: 5px;
border-top-left-radius: 5px;
}
.text[text-last] {
border-top-left-radius: 5px;
}
.massage[data-user="true"] {
display: flex;
justify-content: flex-end;
}
.msgCaption {
padding: 0 25px 10px !important;
padding-top: 10px !important;
}
.user-response {
background: rgb(0, 102, 255);
color: rgb(255, 255, 255);
font-size: 17px;
line-height: 24px;
border-radius: 20px;
max-width: 250px;
padding: 15px 17px;
border-bottom-right-radius: 5px;
word-break: break-all;
white-space: normal;
}
.massage {
padding: 0 25px 0px;
}
.massage img {
width: 100%;
height: 217px;
background: white;
border-radius: 10px;
margin-bottom: 6px;
}
.captionBot img {
width: 18px;
height: 18px;
border-radius: 100%;
}
.captionBot {
display: flex;
justify-content: space-between;
padding: 0 25px;
width: 117px;
font-size: 14px;
color: rgb(24, 25, 25);
}
a {
text-decoration: none;
}
.by a {
font-size: 14px;
font-weight: 600;
margin-left: 3px;
}
.by {
display: flex;
justify-content: center;
align-items: center;
height: 30px;
border-top: 1px solid rgb(238, 238, 238);
}
.by span {
color: rgb(155, 166, 178);
font-size: 12px;
font-weight: 600;
}
.InputMSG {
outline: none;
border: none;
width: 100%;
height: 50px;
padding-left: 15px;
font-size: 1.1rem;
}
.InputMSG::placeholder {
font-size: 1.1rem;
color: rgb(155, 166, 178);
}
.BoxSentMSG {
display: flex;
align-items: center;
width: 100%;
height: 50px;
}
.send-icon {
display: flex;
background-color: white;
width: 26px;
height: 26px;
margin: 0 13px;
cursor: pointer;
}
.ContentChat {
background: rgb(234, 238, 243);
width: 100%;
height: 400px;
overflow-y: scroll;
}
.ContentChat::before {
content: "";
display: block;
height: 20px;
width: 100%;
}
.ContentChat::after {
content: "";
display: block;
height: 20px;
width: 100%;
}
.AvatarBot {
display: grid;
position: relative;
justify-content: center;
align-items: center;
}
.AvatarBot:after {
content: "";
display: block;
width: 9px;
height: 9px;
border-radius: 100%;
border: 1px solid rgb(255, 255, 255);
background: rgb(105, 222, 64);
position: absolute;
bottom: 1px;
right: 1px;
}
.InfoBot {
margin-left: 17px;
}
.status {
color: rgb(155, 166, 179);
}
.TitleBot {
font-size: 24px;
font-weight: 600;
white-space: nowrap;
}
.AvatarBot img {
width: 50px;
height: 50px;
}
.top {
display: flex;
align-.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0