You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
/* 页面背景 - 微信灰 */.chat-list { background-color: #ededed; min-height: 100vh; } /* 列表项 - 微信白色卡片 */ .list-item { display: flex; padding: 10px 15px; background-color: #ffffff; position: relative; align-items: center; /* 关键:垂直居中对齐 */ } /* 微信没有点击变色效果,如果要加可以保留,不加可以删除 */ .list-item:active { background-color: #f4f4f4; } /* 头像区域 - 微信45px,固定大小不变 */ .avatar { width: 45px; height: 45px; margin-right: 12px; flex-shrink: 0; } .avatar image { width: 100%; height: 100%; border-radius: 6px; background-color: #f0f0f0; } /* 内容区域 - 占据剩余空间,垂直居中 */ .content { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; /* 内容垂直居中 */ height: 100%; /* 占满父容器高度 */ } /* 第一行:用户名和时间 */ .info-row { display: flex; justify-content: space-between; align-items: center; width: 100%; line-height: 1.2; /* 控制行高 */ } /* 用户名 - 微信字体16px,粗体,不换行 */ .username { font-size: 16px; font-weight: bold; color: #333333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; /* 自动伸缩 */ min-width: 0; /* 防止溢出 */ } /* 时间 - 微信浅灰色小字,固定宽度不换行 */ .time { font-size: 12px; color: #b3b3b3; white-space: nowrap; margin-left: 8px; } /* 第二行:最后一条消息 */ .message-row { display: flex; align-items: center; width: 100%; margin-top: 16rpx; } /* 消息基础样式 - 微信14px灰色 */ .last-message { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; /* 自动伸缩 */ min-width: 0; /* 防止溢出 */ } /* 正常消息 - 微信灰色 #8a8a8a */ .last-message.normal { color: #9E9E9E; } /* 空消息 - 微信红色 */ .last-message.empty { color: #fa5151; } /* 空状态页面 */ .empty-state { display: flex; justify-content: center; align-items: center; height: 80vh; color: #b3b3b3; font-size: 15px; }
|