css模仿Instagram 多彩聊天窗口样式
代码语言:html
所属分类:布局界面
代码描述:css模仿Instagram 多彩聊天窗口样式,采用flex布局方式
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400&display=swap" rel="stylesheet">
<style>
*, *::after, *::before {
box-sizing: border-box;
font-family: 'Roboto', sans-serif;
}
html {
background: #333;
height: 100%;
}
body {
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
display: -webkit-box;
display: flex;
height: 100%;
}
code {
color: rgba(255, 255, 255, 0.75);
display: inline;
}
.Phone {
background: #111;
box-shadow: 0 19px 38px rgba(0, 0, 0, 0.3), 0 15px 12px rgba(0, 0, 0, 0.22);
height: 100%;
max-height: 720px;
max-width: 420px;
overflow: hidden scroll;
width: 100%;
}
.List {
list-style: none;
margin: 0;
padding: 20px;
}
.Item {
display: -webkit-box;
display: flex;
-webkit-box-align: end;
align-items: flex-end;
}
.Item + .Item {
margin-top: 8px;
}
.Avatar {
border-radius: 50%;
overflow: hidden;
flex-shrink: 0;
-webkit-box-flex: 0;
flex-grow: 0;
height: 32px;
width: 32px;
}
.Avatar-image {
display: block;
width: 100%;
}
.Messages {
display: -webkit-box;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
}
.Message {
color: white;
letter-spacing: 0.5px;
line-height: 1.25;
font-weight: 300;
margin: 1px;
}
.Message-inner {
background: #333;
display: inline-block;
max-width: 260px;
padding: 8px 16px;
}
.Item--left .Messag.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0