u
This commit is contained in:
1 parent
28678fb4df
commit
a6dbe24dd4
43 files changed
+2285
-206
No files matched your search
@@ -1,118 +1,246 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
|
||||
<head>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>公司信息卡片</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>私聊界面示例</title>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #f5f5f5;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 40px;
|
||||
background-color: #ffffff;
|
||||
/* 页面白色背景 */
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
|
||||
"PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
|
||||
color: #333;
|
||||
}
|
||||
/* 左侧聊天列表 */
|
||||
.chat-list {
|
||||
width: 280px;
|
||||
background-color: #fff;
|
||||
border-right: 1px solid #ddd;
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.company-card {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
max-width: 520px;
|
||||
background-color: #fff;
|
||||
/* 卡片白色背景 */
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #ddd;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.chat-list .user-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
cursor: pointer;
|
||||
transition: background-color 0.2s;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.company-card:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
.chat-list .user-card:hover,
|
||||
.chat-list .user-card.active {
|
||||
background-color: #f0f8ff;
|
||||
}
|
||||
|
||||
.company-logo {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
border-radius: 10px;
|
||||
object-fit: cover;
|
||||
margin-right: 16px;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.chat-list .avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
margin-right: 12px;
|
||||
object-fit: cover;
|
||||
border: 2px solid #4caf50;
|
||||
/* 默认在线状态绿色 */
|
||||
}
|
||||
|
||||
.company-info {
|
||||
flex: 1;
|
||||
}
|
||||
.chat-list .user-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.company-name {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #222;
|
||||
}
|
||||
.chat-list .user-name {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.company-meta {
|
||||
margin: 6px 0 10px;
|
||||
font-size: 13px;
|
||||
color: #888;
|
||||
}
|
||||
.chat-list .user-position {
|
||||
margin: 2px 0 0 0;
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.company-desc {
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: #555;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.chat-list .status {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
background-color: #4caf50;
|
||||
}
|
||||
|
||||
.company-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
.chat-list .offline {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: 12px;
|
||||
padding: 4px 10px;
|
||||
border-radius: 6px;
|
||||
background-color: #eef5ff;
|
||||
color: #3a7afe;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* 右侧聊天详情 */
|
||||
.chat-detail {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
|
||||
.chat-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.chat-header .avatar {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
margin-right: 12px;
|
||||
border: 2px solid #4caf50;
|
||||
}
|
||||
|
||||
.chat-header .info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.chat-header .info .name {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.chat-header .info .position {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.chat-header .info .company-info {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.chat-header .info .company-logo {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 4px;
|
||||
border-radius: 2px;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.messages {
|
||||
flex: 1;
|
||||
padding: 16px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.message {
|
||||
margin-bottom: 12px;
|
||||
max-width: 70%;
|
||||
padding: 8px 12px;
|
||||
border-radius: 12px;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.message.self {
|
||||
background-color: #dcf8c6;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.message.other {
|
||||
background-color: #fff;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.chat-input {
|
||||
padding: 12px 16px;
|
||||
border-top: 1px solid #ddd;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.chat-input input {
|
||||
flex: 1;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 20px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.chat-input button {
|
||||
padding: 8px 16px;
|
||||
border: none;
|
||||
background-color: #4caf50;
|
||||
color: #fff;
|
||||
border-radius: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="company-card">
|
||||
<img class="company-logo" src="https://via.placeholder.com/150" alt="公司 Logo" />
|
||||
|
||||
<div class="company-info">
|
||||
<h3 class="company-name">远航国际物流有限公司</h3>
|
||||
|
||||
<div class="company-meta">
|
||||
成立于 2012 年 · 上海
|
||||
</div>
|
||||
|
||||
<div class="company-desc">
|
||||
专注于海运、空运及多式联运服务,为客户提供高效、稳定、
|
||||
可视化的国际物流解决方案,覆盖全球主要港口。
|
||||
</div>
|
||||
|
||||
<div class="company-tags">
|
||||
<span class="tag">海运</span>
|
||||
<span class="tag">国际物流</span>
|
||||
<span class="tag">货运代理</span>
|
||||
<span class="tag">跨境贸易</span>
|
||||
</div>
|
||||
<body>
|
||||
<!-- 左侧聊天列表 -->
|
||||
<div class="chat-list">
|
||||
<div class="user-card active">
|
||||
<img class="avatar" src="https://i.pravatar.cc/40?img=1" alt="头像" />
|
||||
<div class="user-info">
|
||||
<p class="user-name">张三</p>
|
||||
<p class="user-position">前端工程师</p>
|
||||
</div>
|
||||
<div class="status"></div>
|
||||
</div>
|
||||
|
||||
<div class="user-card">
|
||||
<img class="avatar" src="https://i.pravatar.cc/40?img=2" alt="头像" />
|
||||
<div class="user-info">
|
||||
<p class="user-name">李四</p>
|
||||
<p class="user-position">产品经理</p>
|
||||
</div>
|
||||
<div class="status offline"></div>
|
||||
</div>
|
||||
|
||||
<div class="user-card">
|
||||
<img class="avatar" src="https://i.pravatar.cc/40?img=3" alt="头像" />
|
||||
<div class="user-info">
|
||||
<p class="user-name">王五</p>
|
||||
<p class="user-position">设计师</p>
|
||||
</div>
|
||||
<div class="status"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<!-- 右侧聊天详情 -->
|
||||
<div class="chat-detail">
|
||||
<!-- 聊天头部 -->
|
||||
<div class="chat-header">
|
||||
<img class="avatar" src="https://i.pravatar.cc/50?img=1" alt="头像" />
|
||||
<div class="info">
|
||||
<p class="name">张三</p>
|
||||
<p class="position">前端工程师</p>
|
||||
<div class="company-info">
|
||||
<img class="company-logo" src="https://via.placeholder.com/16" alt="公司logo" />
|
||||
<span>ABC科技公司</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</html>
|
||||
<!-- 消息区域 -->
|
||||
<div class="messages">
|
||||
<div class="message other">你好!这是张三的消息。</div>
|
||||
<div class="message self">你好,我是自己发的消息。</div>
|
||||
<div class="message other">我们下午开会吗?</div>
|
||||
<div class="message self">好的,下午三点。</div>
|
||||
</div>
|
||||
|
||||
<!-- 输入框 -->
|
||||
<div class="chat-input">
|
||||
<input type="text" placeholder="输入消息..." />
|
||||
<button>发送</button>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user