html+css实现好友列表,类似QQ群聊成员列表。
1.最终效果图: 2.html部分:
群主
共享达人
共享一直都在
管理员
未来
共享一直都在
大神
游戏达人
共享是一种游戏
学霸
外星人少
高效共享
群众(3人)
共享小白
小白的世界你不懂
程序猿一枚
请叫我大神
努力向上
我要拿第一
3.css实现
html,
body {
height: 100%;
width: 100%;
background: #f0f0f0;
font-size: 14px;
}
.tip{
height: 20px;
line-height: 20px;
font-size: 14px;
color: gray;
padding-left: 10px;
}
.none{
display: none;
}
.item{
width: 100%;
height: 60px;
box-sizing: border-box;
border-bottom: 1px solid #eee;
background-color: #fff;
display: flex;
}
.face{
width: 44px;
height: 44px;
border-radius: 50%;
position: absolute;
left: 10px;
margin-top: 8px;
object-fit: cover;
}
.des{
height: 60px;
display: inline-block;
margin-left: 65px;
white-space : nowrap;
text-overflow : ellipsis;
overflow:hidden;
flex: 1;
}
.nickName{
/*height: 30px;*/
margin-top: 10px;
}
.nickName span{
height: 25px;
line-height: 25px;
font-size: 16px;
white-space : nowrap;
text-overflow : ellipsis;
overflow:hidden;
}
.signature{
/*height: 30px;*/
margin-top: -5px;
}
.signature span{
height: 20px;
line-height: 20px;
font-size: 12px;
color:gray;
white-space : nowrap;
text-overflow : ellipsis;
overflow:hidden;
}
.sel{
width: 30px;
height: 60px;
display: inline-block;
float: right;
margin-right: 5px;
}
.sel img{
width: 30px;
height: 30px;
margin-top: 15px;
}
这些都是本人在实际工作中的成果,各大应用商店可以搜索成品App《优享人》,包括IOS应用商店。 分享出来,希望能帮助到有需要的朋友!
|