div+css布局实现高端上门按摩类app的ui设计交互代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现高端上门按摩类app的ui设计交互代码
代码标签: div 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>SpaHome - 高端上门按摩服务</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f8f9fa;
color: #333;
overflow-x: hidden;
}
.page {
display: none;
min-height: 100vh;
width: 100%;
max-width: 414px;
margin: 0 auto;
background: white;
position: relative;
box-shadow: 0 0 20px rgba(0,0,0,0.1);
}
.page.active {
display: block;
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 50px 20px 30px;
text-align: center;
position: relative;
}
.back-btn {
position: absolute;
left: 20px;
top: 50px;
background: none;
border: none;
color: white;
font-size: 24px;
cursor: pointer;
padding: 5px;
}
.logo {
font-size: 32px;
font-weight: 700;
margin-bottom: 10px;
letter-spacing: -1px;
}
.subtitle {
font-size: 16px;
opacity: 0.9;
font-weight: 300;
}
.nav-tabs {
display: flex;
background: white;
border-bottom: 1px solid #eee;
position: sticky;
top: 0;
z-index: 100;
}
.nav-tab {
flex: 1;
padding: 15px;
text-align: center;
background: none;
border: none;
color: #666;
font-weight: 500;
cursor: pointer;
border-bottom: 3px solid transparent;
transition: all 0.3s ease;
}
.nav-tab.active {
color: #667eea;
border-bottom-color: #667eea;
}
.content {
padding: 20px;
min-height: calc(100vh - 200px);
}
.service-card {
background: white;
border-radius: 15px;
margin-bottom: 20px;
overflow: hidden;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
transition: transform 0.3s ease;
cursor: pointer;
}
.service-card:hover {
transform: translateY(-5px);
}
.service-image {
width: 100%;
height: 200px;
background-size: cover;
background-position: center;
position: relative;
}
.service-badge {
position: absolute;
top: 15px;
right: 15px;
background: rgba(255,255,255,0.9);
padding: 5px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
color: #667eea;
}
.service-info {
padding: 20px;
}
.service-title {
font-size: 18px;
font-weight: 600;
margin-bottom: 8px;
color: #333;
}
.service-desc {
color: #666;
font-size: 14px;
line-height: 1.5;
margin-bottom: 15px;
}
.service-price {
display: flex;
justify-content: space-between;
align-items: center;
}
.price {
font-size: 20px;
font-weight: 700;
color: #667eea;
}
.duration {
color: #999;
font-size: 14px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
padding: 15px 30px;
border-radius: 25px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
width: 100%;
margin-top: 20px;
transition: all 0.3s ease;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}
.btn-secondary {
background: #f8f9fa;
color: #667eea;
border: 2px solid #667eea;
padding: 12px 25px;
border-radius: 25px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
}
.therapist-card {
background: white;
border-radius: 15px;
padding: 20px;
margin-bottom: 15px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
display: flex;
align-items: center;
cursor: pointer;
}
.therapist-avatar {
width: 60px;
height: 60px;
border-radius: 50%;
background-size: cover;
background-position: center;
margin-right: 15px;
}
.therapist-info {
flex: 1;
}
.therapist-name {
font-size: 16px;
font-weight: 600;
margin-bottom: 5px;
}
.therapist-rating {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.stars {
color: #ffc107;
margin-right: 8px;
}
.therapist-specialty {
color: #666;
font-size: 12px;
}
.booking-form {
background: white;
border-radius: 15px;
padding: 25px;
margin-bottom: 20px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.form-group {
margin-bottom: 20px;
}
.form-label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #333;
}
.form-input {
width: 100%;
padding: 15px;
border: 2px solid #eee;
border-radius: 10px;
font-size: 16px;
transition: border-color 0.3s ease;
}
.form-input:focus {
outline: none;
border-color: #667eea;
}
.time-slots {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
margin-top: 10px;
}
.time-slot {
padding: 12px;
border: 2px solid #eee;
border-radius: 8px;
text-align: center;
cursor: pointer;
transition: all 0.3s ease;
background: white;
}
.time-slot.selected {
border-color: #667eea;
background: #667eea;
color: white;
}
.bottom-nav {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 100%;
max-width: 414px;
background: white;
border-top: 1px solid #eee;
padding: 10px 0;
display: flex;
justify-content: space-around;
z-index: 1000;
}
.nav-item {
display: flex;
flex-direction: column;
align-items: center;
padding: 8px;
color: #999;
text-decoration: none;
font-size: 12px;
cursor: pointer;
transition: color 0.3s ease;
}
.nav-item.active {
color: #667eea;
}
.nav-icon {
width: 24px;
height: 24px;
margin-bottom: 4px;
}
.order-card {
background: white;
border-radius: 15px;
padding: 20px;
margin-bottom: 15px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.order-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15px;
}
.order-id {
font-weight: 600;
color: #333;
}
.order-status {
padding: 5px 12px;
border-radius: 15px;
font-size: 12px;
font-weight: 600;
}
.status-pending { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d1ecf1; color: #0c5460; }
.status-completed { background: #d4edda; color: #155724; }
.profile-section {
background: white;
border-radius: 15px;
padding: 25px;
margin-bottom: 20px;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.profile-header {
display: flex;
align-items: center;
margin-bottom: 25px;
}
.profile-avatar {
width: 80px;
height: 80px;
border-radius: 50%;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 32px;
font-weight: 600;
margin-right: 20px;
}
.menu-item {
display: flex;
align-items: center;
padding: 15px 0;
border-bottom: 1px solid #f0f0f0;
cursor: pointer;
transition: background 0.3s ease;
}
.menu-item:hover {
background: #f8f9fa;
}
.menu-icon {
width: 24px;
height: 24px;
margin-right: 15px;
fill: #667eea;
}
.search-bar {
position: relative;
margin-bottom: 20px;
}
.search-input {
width: 100%;
padding: 15px 50px 15px 20px;
border: 2px solid #eee;
border-radius: 25px;
font-size: 16px;
background: #f8f9fa;
}
.search-icon {
position: absolute;
right: 20px;
top: 50%;
transform: translateY(-50%);
width: 20px;
height: 20px;
fill: #999;
}
.welcome-section {
text-align: center;
padding: 40px 20px;
}
.welcome-title {
font-size: 28px;
font-weight: 700;
margin-bottom: 15px;
color: #333;
}
.welcome-subtitle {
font-size: 16px;
color: #666;
line-height: 1.6;
margin-bottom: 30px;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 15px;
margin: 30px 0;
}
.feature-card {
background: white;
border-radius: 15px;
padding: 25px 20px;
text-align: center;
box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.feature-icon {
width: 48px;
height: 48px;
margin: 0 auto 15px;
fill: #667eea;
}
.category-tabs {
display: flex;
gap: 10px;
margin-bottom: 25px;
overflow-x: auto;
padding-bottom: 5px;
}
.category-tab {
background: #f8f9fa;
color: #666;
border: none;
padding: 10px 20px;
border-radius: 20px;
white-space: nowrap;
cursor: pointer;
transition: all 0.3s ease;
}
.category-tab.active {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.notification-item {
background: white;
border-radius: 12px;
padding: 20px;
margin-bottom: 15px;
box-shadow: 0 2px 10px rgba(0,0,0,0.08);
border-left: 4px solid #667eea;
}
.notification-title {
font-weight: 600;
margin-bottom: 8px;
color: #333;
}
.notification-text {
color: #666;
font-size: 14px;
line-height: 1.5;
margin-bottom: 8px;
}
.notification-time {
color: #999;
font-size: 12px;
}
@media (max-width: 414px) {
.feature-grid {
grid-template-columns: 1fr;
}
.time-slots {
grid-template-columns: repeat(2, 1fr);
}
}
</style>
</head>
<body>
<!-- 欢迎页面 -->
<div class="page active" id="welcome">
<div class="header">
<div class="logo">SpaHome</div>
<div class="subtitle">专业上门按摩服务</div>
</div>
<div class="welcome-section">
<div class="welcome-title">享受专业按摩服务</div>
<div class="welcome-subtitle">足不出户,专业理疗师为您提供高品质的按摩理疗服务</div>
<div class="feature-grid">
<div class="feature-card">
<svg class="feature-icon" viewBox="0 0 24 24">
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/>
</svg>
<div style="font-weight: 600; margin-bottom: 8px;">专业认证</div>
<div style="color: #666; font-size: 14px;">持证上岗的专业理疗师</div>
</div>
<div class="feature-card">
<svg class="feature-icon" viewBox="0 0 24 24">
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
</svg>
<div style="font-weight: 600; margin-bottom: 8px;">五星服务</div>
<div style="color: #666; font-size: 14px;">用户满意度99%</div>
</div>
<div class="feature-card">
<svg class="feature-icon" viewBox="0 0 24 24&quo.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0