效果如下
所用图片如下
html
<!DOCTYPE html>
<html>
<head>
<title>微信</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type"text/css" href="css/wechat.css">
</head>
<body>
<header>
<label>微信(88)</label>
<div class="icon_box">
<img class="search" src="./img/search.png">
<img src="./img/add.png">
</div>
</header>
<main>
<ul class="user-list">
<li class="user-item">
<img clss="photo" src="./img/1.png">
<div class="msg">
<label>南开大学信息化</label>
<p>"贝贝"通过XX分享的二维码加入了群聊</p>
</div>
<div class="time">周五</div>
</li>
<li class="user-item">
<img clss="photo" src="./img/2.png">
<div class="msg">
<label>联合国</label>
<p>王洪杰:好的</p>
</div>
<div class="time">昨天</div>
</li>
<li class="user-item">
<img clss="photo" src="./img/1.png">
<div class="msg">
<label>南开大学信息化</label>
<p>"贝贝"通过XX分享的二维码加入了群聊</p>
</div>
<div class="time">周五</div>
</li>
<li class="user-item">
<img clss="photo" src="./img/2.png">
<div class="msg">
<label>联合国</label>
<p>王洪杰:好的</p>
</div>
<div class="time">昨天</div>
</li>
<li class="user-item">
<img clss="photo" src="./img/1.png">
<div class="msg">
<label>南开大学信息化</label>
<p>"贝贝"通过XX分享的二维码加入了群聊</p>
</div>
<div class="time">周五</div>
</li>
<li class="user-item">
<img clss="photo" src="./img/2.png">
<div class="msg">
<label>联合国</label>
<p>王洪杰:好的</p>
</div>
<div class="time">昨天</div>
</li>
<li class="user-item">
<img clss="photo" src="./img/1.png">
<div class="msg">
<label>南开大学信息化</label>
<p>"贝贝"通过XX分享的二维码加入了群聊</p>
</div>
<div class="time">周五</div>
</li>
<li class="user-item">
<img clss="photo" src="./img/2.png">
<div class="msg">
<label>联合国</label>
<p>王洪杰:好的</p>
</div>
<div class="time">昨天</div>
</li>
</ul>
</main>
<footer>
<div class="footer-item">
<img src="./img/wechat_active.png">
<label>微信</label>
</div>
<div class="footer-item">
<img src="./img/contact.png">
<label>通讯录</label>
</div>
<div class="footer-item">
<img src="./img/find.png">
<label>发现</label>
</div>
<div class="footer-item">
<img src="./img/me.png">
<label>我</label>
</div>
</footer>
</body>
</html>
wechat.css
body,html{
padding: 0;
margin: 0;
font-family:微软雅黑;
}
header {
display: flex;
flex-direction: row;
justify-content: space-between;
height: 3em;
background:#eee;
line-height: 3em;
padding: 0 1em;
color: #333;
position: fixed;
top:0;
left: 0;
width: 100%;
z-index: 999;
box-sizing: border-box;
}
header label{
font-size: 16px;
}
.icon_box{
/*margin-right: 20px;*/
}
.icon_box img{
height: 1.5em;
width: 1.5em;
vertical-align: text-bottom;
margin-left: 0.5em;
}
.icon_box .search{
height: 1.3em;
width: 1.3em;
}
footer{
display: flex;
flex-direction: row;
justify-content: space-around;
height: 4em;
background: #eee;
align-items: center;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
}
.footer-item *{
display: block;
text-align: center;
}
.footer-item img{
width: 2em;
}
.footer-item label{
font-size: 12px;
}
.user-list{
list-style: none;
padding: 0;
margin-top: 50px;
margin-bottom: 70px;
}
.user-item{
position: relative;
margin-top: 5px;
}
.user-item img{
width: 50px;
height: 50px;
position: absolute;
left: 0.5em;
top: 0.5em;
}
.user-item .msg{
padding: 0.5em 66px;
}
.user-item .msg label{
font-weight: bold;
color: #333;
}
.user-item .msg p{
margin:0;
color: #666;
font-size: 12px;
margin-top: 10px;
/*border-bottom: 1px solid #ddd;*/
padding-bottom: 10px;
}
.user-item .time{
position: absolute;
right: 0.5em;
top: 0.5em;
width: 50px;
height: 50px;
}