js+css布局实现移动端陌生人交友类app的ui原型图代码
代码语言:html
所属分类:其他
代码描述:js+css布局实现移动端陌生人交友类app的ui原型图代码
代码标签: js css 布局 移动端 陌生人 交友 app ui 原型图 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>陌生人交友聊天App</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5;
overflow-x: hidden;
}
.app-container {
max-width: 375px;
margin: 0 auto;
background: white;
min-height: 100vh;
position: relative;
box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
.page {
display: none;
min-height: 100vh;
position: relative;
}
.page.active {
display: block;
}
/* Header */
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 20px 20px 10px;
text-align: center;
position: relative;
}
.header h1 {
font-size: 24px;
margin-bottom: 10px;
}
.back-btn {
position: absolute;
left: 20px;
top: 20px;
background: none;
border: none;
color: white;
cursor: pointer;
padding: 5px;
}
/* Navigation */
.nav-bar {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 375px;
background: white;
display: flex;
padding: 10px 0;
box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
z-index: 1000;
}
.nav-item {
flex: 1;
text-align: center;
padding: 5px;
cursor: pointer;
color: #999;
transition: color 0.3s;
}
.nav-item.active {
color: #667eea;
}
.nav-item svg {
width: 24px;
height: 24px;
margin-bottom: 5px;
}
.nav-item span {
display: block;
font-size: 12px;
}
/* Welcome Page */
.welcome-content {
text-align: center;
padding: 60px 30px;
}
.app-logo {
width: 120px;
height: 120px;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 50%;
margin: 0 auto 30px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 48px;
}
.welcome-title {
font-size: 28px;
color: #333;
margin-bottom: 15px;
}
.welcome-subtitle {
font-size: 16px;
color: #666;
margin-bottom: 50px;
line-height: 1.5;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 15px 40px;
border-radius: 25px;
font-size: 16px;
cursor: pointer;
margin: 10px;
transition: transform 0.2s;
}
.btn-primary:hover {
transform: scale(1.05);
}
.btn-secondary {
background: white;
color: #667eea;
border: 2px solid #667eea;
padding: 13px 40px;
border-radius: 25px;
font-size: 16px;
cursor: pointer;
margin: 10px;
transition: all 0.2s;
}
.btn-secondary:hover {
background: #667eea;
color: white;
}
/* Discovery Page */
.content {
padding: 20px;
padding-bottom: 80px;
}
.user-card {
background: white;
border-radius: 15px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
cursor: pointer;
transition: transform 0.2s;
}
.user-card:hover {
transform: translateY(-2px);
}
.user-header {
display: flex;
align-items: center;
margin-bottom: 15px;
}
.user-avatar {
width: 60px;
height: 60px;
border-radius: 50%;
margin-right: 15px;
object-fit: cover;
}
.user-info h3 {
font-size: 18px;
color: #333;
margin-bottom: 5px;
}
.user-info p {
color: #666;
font-size: 14px;
}
.user-bio {
color: #555;
line-height: 1.5;
margin-bottom: 15px;
}
.user-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.tag {
background: #f0f0f0;
color: #666;
padding: 5px 12px;
border-radius: 15px;
font-size: 12px;
}
/* Chat List */
.chat-item {
display: flex;
align-items: center;
padding: 15px 20px;
border-bottom: 1px solid #f0f0f0;
cursor: pointer;
transition: background 0.2s;
}
.chat-item:hover {
background: #f9f9f9;
}
.chat-avatar {
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 15px;
object-fit: cover;
}
.chat-info {
flex: 1;
}
.chat-name {
font-size: 16px;
color: #333;
margin-bottom: 5px;
}
.chat-last-message {
color: #666;
font-size: 14px;
}
.chat-time {
color: #999;
font-size: 12px;
}
.chat-unread {
background: #ff4757;
color: white;
border-radius: 50%;
width: 20px;
height: 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
margin-left: 10px;
}
/* Chat Room */
.chat-header {
background: white;
padding: 15px 20px;
border-bottom: 1px solid #f0f0f0;
display: flex;
align-items: center;
}
.chat-header-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
margin-right: 15px;
object-fit: cover;
}
.chat-header-info h3 {
font-size: 16px;
color: #333;
}
.chat-header-info p {
font-size: 12px;
color: #666;
}
.chat-messages {
flex: 1;
pad.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0