530 lines
15 KiB
HTML
530 lines
15 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="zh-CN">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>电商首页</title>
|
||
|
|
<style>
|
||
|
|
* {
|
||
|
|
margin: 0;
|
||
|
|
padding: 0;
|
||
|
|
box-sizing: border-box;
|
||
|
|
}
|
||
|
|
|
||
|
|
body {
|
||
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
|
||
|
|
background: linear-gradient(180deg, #2d5a3d 0%, #4a7c59 50%, #f5f5f5 50%);
|
||
|
|
min-height: 100vh;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 状态栏 */
|
||
|
|
.status-bar {
|
||
|
|
background: #2d5a3d;
|
||
|
|
color: white;
|
||
|
|
padding: 8px 20px;
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-between;
|
||
|
|
align-items: center;
|
||
|
|
font-size: 16px;
|
||
|
|
font-weight: bold;
|
||
|
|
}
|
||
|
|
|
||
|
|
.status-icons {
|
||
|
|
display: flex;
|
||
|
|
gap: 8px;
|
||
|
|
font-size: 14px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 头部区域 */
|
||
|
|
.header {
|
||
|
|
background: linear-gradient(180deg, #2d5a3d 0%, #4a7c59 100%);
|
||
|
|
padding: 15px 20px 25px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.location {
|
||
|
|
color: white;
|
||
|
|
font-size: 16px;
|
||
|
|
margin-bottom: 15px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.location::before {
|
||
|
|
content: "📍";
|
||
|
|
margin-right: 5px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 搜索框 */
|
||
|
|
.search-container {
|
||
|
|
display: flex;
|
||
|
|
gap: 10px;
|
||
|
|
margin-bottom: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.search-box {
|
||
|
|
flex: 1;
|
||
|
|
background: white;
|
||
|
|
border-radius: 25px;
|
||
|
|
padding: 12px 20px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.qr-icon {
|
||
|
|
width: 20px;
|
||
|
|
height: 20px;
|
||
|
|
background: #ddd;
|
||
|
|
border-radius: 3px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.search-input {
|
||
|
|
flex: 1;
|
||
|
|
border: none;
|
||
|
|
outline: none;
|
||
|
|
font-size: 15px;
|
||
|
|
color: #999;
|
||
|
|
}
|
||
|
|
|
||
|
|
.search-btn {
|
||
|
|
background: #2d5a3d;
|
||
|
|
border: none;
|
||
|
|
border-radius: 50%;
|
||
|
|
width: 45px;
|
||
|
|
height: 45px;
|
||
|
|
color: white;
|
||
|
|
font-size: 18px;
|
||
|
|
cursor: pointer;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 导航标签 */
|
||
|
|
.nav-tabs {
|
||
|
|
display: flex;
|
||
|
|
justify-content: center;
|
||
|
|
gap: 30px;
|
||
|
|
color: white;
|
||
|
|
font-size: 16px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-tab {
|
||
|
|
padding: 8px 0;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-tab.active {
|
||
|
|
color: #ffa500;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-tab.active::after {
|
||
|
|
content: '';
|
||
|
|
position: absolute;
|
||
|
|
bottom: 0;
|
||
|
|
left: 50%;
|
||
|
|
transform: translateX(-50%);
|
||
|
|
width: 30px;
|
||
|
|
height: 3px;
|
||
|
|
background: #ffa500;
|
||
|
|
border-radius: 2px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 主要内容区域 */
|
||
|
|
.main-content {
|
||
|
|
background: #f5f5f5;
|
||
|
|
border-radius: 20px 20px 0 0;
|
||
|
|
margin-top: -15px;
|
||
|
|
padding: 20px;
|
||
|
|
min-height: calc(100vh - 200px);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 横幅广告 */
|
||
|
|
.banner {
|
||
|
|
background: linear-gradient(135deg, rgba(45, 90, 61, 0.8), rgba(74, 124, 89, 0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><rect fill="%234a7c59" width="400" height="200"/><path fill="%2370b77e" d="M300 50c30 0 50 20 50 50s-20 50-50 50c-20 0-40-10-50-30-10 20-30 30-50 30-30 0-50-20-50-50s20-50 50-50c20 0 40 10 50 30 10-20 30-30 50-30z"/></svg>');
|
||
|
|
border-radius: 15px;
|
||
|
|
padding: 25px;
|
||
|
|
color: white;
|
||
|
|
margin-bottom: 20px;
|
||
|
|
background-size: cover;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
|
||
|
|
.banner-text {
|
||
|
|
font-size: 22px;
|
||
|
|
font-weight: bold;
|
||
|
|
line-height: 1.3;
|
||
|
|
margin-bottom: 15px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.banner-btn {
|
||
|
|
background: rgba(255, 165, 0, 0.9);
|
||
|
|
color: white;
|
||
|
|
border: none;
|
||
|
|
padding: 8px 20px;
|
||
|
|
border-radius: 20px;
|
||
|
|
font-size: 14px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 商品分类网格 */
|
||
|
|
.category-grid {
|
||
|
|
display: grid;
|
||
|
|
grid-template-columns: repeat(5, 1fr);
|
||
|
|
gap: 15px;
|
||
|
|
margin-bottom: 20px;
|
||
|
|
background: white;
|
||
|
|
padding: 20px;
|
||
|
|
border-radius: 15px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.category-item {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
align-items: center;
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.category-icon {
|
||
|
|
width: 50px;
|
||
|
|
height: 50px;
|
||
|
|
border-radius: 50%;
|
||
|
|
margin-bottom: 8px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
font-size: 24px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.category-name {
|
||
|
|
font-size: 12px;
|
||
|
|
color: #333;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 推荐区域 */
|
||
|
|
.recommendation {
|
||
|
|
background: white;
|
||
|
|
border-radius: 15px;
|
||
|
|
padding: 15px 20px;
|
||
|
|
margin-bottom: 20px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: space-between;
|
||
|
|
}
|
||
|
|
|
||
|
|
.recommendation-left {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.speaker-icon {
|
||
|
|
width: 30px;
|
||
|
|
height: 30px;
|
||
|
|
background: #4a7c59;
|
||
|
|
border-radius: 50%;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
color: white;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 功能区域卡片 */
|
||
|
|
.feature-cards {
|
||
|
|
display: grid;
|
||
|
|
grid-template-columns: repeat(4, 1fr);
|
||
|
|
gap: 10px;
|
||
|
|
margin-bottom: 20px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.feature-card {
|
||
|
|
background: linear-gradient(135deg, #2d5a3d, #4a7c59);
|
||
|
|
border-radius: 15px;
|
||
|
|
padding: 15px 10px;
|
||
|
|
color: white;
|
||
|
|
text-align: center;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
|
||
|
|
.feature-card h4 {
|
||
|
|
font-size: 14px;
|
||
|
|
margin-bottom: 5px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.feature-card p {
|
||
|
|
font-size: 12px;
|
||
|
|
opacity: 0.9;
|
||
|
|
}
|
||
|
|
|
||
|
|
.feature-card::after {
|
||
|
|
content: '>';
|
||
|
|
position: absolute;
|
||
|
|
right: 10px;
|
||
|
|
top: 50%;
|
||
|
|
transform: translateY(-50%);
|
||
|
|
color: rgba(255,255,255,0.7);
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 菜市场区域 */
|
||
|
|
.market-section {
|
||
|
|
background: white;
|
||
|
|
border-radius: 15px;
|
||
|
|
padding: 15px;
|
||
|
|
margin-bottom: 20px;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
|
||
|
|
.market-title {
|
||
|
|
background: linear-gradient(135deg, #2d5a3d, #4a7c59);
|
||
|
|
color: white;
|
||
|
|
padding: 10px 15px;
|
||
|
|
border-radius: 10px;
|
||
|
|
font-size: 16px;
|
||
|
|
font-weight: bold;
|
||
|
|
margin-bottom: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.market-image {
|
||
|
|
width: 100%;
|
||
|
|
height: 120px;
|
||
|
|
background: linear-gradient(135deg, #4a7c59, #70b77e);
|
||
|
|
border-radius: 10px;
|
||
|
|
position: relative;
|
||
|
|
overflow: hidden;
|
||
|
|
}
|
||
|
|
|
||
|
|
.market-image::after {
|
||
|
|
content: '🥗';
|
||
|
|
position: absolute;
|
||
|
|
right: 15px;
|
||
|
|
bottom: 15px;
|
||
|
|
font-size: 30px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* 底部导航 */
|
||
|
|
.bottom-nav {
|
||
|
|
position: fixed;
|
||
|
|
bottom: 0;
|
||
|
|
left: 0;
|
||
|
|
right: 0;
|
||
|
|
background: white;
|
||
|
|
display: flex;
|
||
|
|
justify-content: space-around;
|
||
|
|
padding: 10px 0 25px;
|
||
|
|
border-top: 1px solid #eee;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-item {
|
||
|
|
display: flex;
|
||
|
|
flex-direction: column;
|
||
|
|
align-items: center;
|
||
|
|
color: #999;
|
||
|
|
font-size: 12px;
|
||
|
|
position: relative;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-item.active {
|
||
|
|
color: #4a7c59;
|
||
|
|
}
|
||
|
|
|
||
|
|
.nav-icon {
|
||
|
|
width: 25px;
|
||
|
|
height: 25px;
|
||
|
|
margin-bottom: 5px;
|
||
|
|
border-radius: 50%;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
font-size: 18px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.cart-badge {
|
||
|
|
position: absolute;
|
||
|
|
top: -5px;
|
||
|
|
right: -5px;
|
||
|
|
background: #ff4444;
|
||
|
|
color: white;
|
||
|
|
border-radius: 50%;
|
||
|
|
width: 18px;
|
||
|
|
height: 18px;
|
||
|
|
font-size: 10px;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.floating-btn {
|
||
|
|
position: fixed;
|
||
|
|
bottom: 100px;
|
||
|
|
right: 20px;
|
||
|
|
width: 50px;
|
||
|
|
height: 50px;
|
||
|
|
background: #ffa500;
|
||
|
|
border-radius: 50%;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
color: white;
|
||
|
|
font-size: 24px;
|
||
|
|
box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
|
||
|
|
}
|
||
|
|
|
||
|
|
.voice-btn {
|
||
|
|
position: fixed;
|
||
|
|
bottom: 160px;
|
||
|
|
right: 20px;
|
||
|
|
width: 50px;
|
||
|
|
height: 50px;
|
||
|
|
background: #ffa500;
|
||
|
|
border-radius: 50%;
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: center;
|
||
|
|
color: white;
|
||
|
|
font-size: 18px;
|
||
|
|
box-shadow: 0 4px 15px rgba(255, 165, 0, 0.3);
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
</head>
|
||
|
|
<body>
|
||
|
|
<!-- 状态栏 -->
|
||
|
|
<div class="status-bar">
|
||
|
|
<div>08:24</div>
|
||
|
|
<div class="status-icons">
|
||
|
|
<span>🔵</span>
|
||
|
|
<span>📶</span>
|
||
|
|
<span>📶</span>
|
||
|
|
<span>🔋 58%</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- 头部区域 -->
|
||
|
|
<div class="header">
|
||
|
|
<div class="location">上海市 | 矛台喜香万家... ></div>
|
||
|
|
|
||
|
|
<div class="search-container">
|
||
|
|
<div class="search-box">
|
||
|
|
<div class="qr-icon"></div>
|
||
|
|
<input type="text" class="search-input" placeholder="输入店铺/商品名称进行查询">
|
||
|
|
</div>
|
||
|
|
<button class="search-btn">🔍</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="nav-tabs">
|
||
|
|
<div class="nav-tab">关注</div>
|
||
|
|
<div class="nav-tab active">推荐</div>
|
||
|
|
<div class="nav-tab">云店市集</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- 主要内容区域 -->
|
||
|
|
<div class="main-content">
|
||
|
|
<!-- 横幅广告 -->
|
||
|
|
<div class="banner">
|
||
|
|
<div class="banner-text">当季精选<br>新品发布</div>
|
||
|
|
<button class="banner-btn">立即尝鲜</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- 商品分类网格 -->
|
||
|
|
<div class="category-grid">
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #e8f4fd;">🥛</div>
|
||
|
|
<div class="category-name">豆制品类</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #ffeaa7;">🥓</div>
|
||
|
|
<div class="category-name">腌腊制品</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #fab1a0;">🍿</div>
|
||
|
|
<div class="category-name">休闲食品</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #fd79a8;">🍷</div>
|
||
|
|
<div class="category-name">酒水饮料</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #fdcb6e;">🌰</div>
|
||
|
|
<div class="category-name">南北干货</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #74b9ff;">🧽</div>
|
||
|
|
<div class="category-name">日用清洁</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #ffeaa7;">🥐</div>
|
||
|
|
<div class="category-name">早点餐饮</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #fd79a8;">🎁</div>
|
||
|
|
<div class="category-name">生活礼品</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #fdcb6e;">🍳</div>
|
||
|
|
<div class="category-name">家居厨具</div>
|
||
|
|
</div>
|
||
|
|
<div class="category-item">
|
||
|
|
<div class="category-icon" style="background: #81ecec;">📱</div>
|
||
|
|
<div class="category-name">家电数码</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- 推荐区域 -->
|
||
|
|
<div class="recommendation">
|
||
|
|
<div class="recommendation-left">
|
||
|
|
<div class="speaker-icon">📢</div>
|
||
|
|
<span>大妈号</span>
|
||
|
|
</div>
|
||
|
|
<div>去看看 ></div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- 功能区域卡片 -->
|
||
|
|
<div class="feature-cards">
|
||
|
|
<div class="feature-card">
|
||
|
|
<h4>云店市集</h4>
|
||
|
|
<p>全国到家</p>
|
||
|
|
</div>
|
||
|
|
<div class="feature-card">
|
||
|
|
<h4>福利专区</h4>
|
||
|
|
<p>优惠多多</p>
|
||
|
|
</div>
|
||
|
|
<div class="feature-card">
|
||
|
|
<h4>预售专区</h4>
|
||
|
|
<p>优惠预定</p>
|
||
|
|
</div>
|
||
|
|
<div class="feature-card" style="background: #ffa500;">
|
||
|
|
<h4>订单备货中</h4>
|
||
|
|
<p>新鲜现采</p>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- 菜市场区域 -->
|
||
|
|
<div class="market-section">
|
||
|
|
<div class="market-title">全季菜市场</div>
|
||
|
|
<div class="market-image"></div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- 浮动按钮 -->
|
||
|
|
<div class="voice-btn">🎤</div>
|
||
|
|
<div class="floating-btn">+</div>
|
||
|
|
|
||
|
|
<!-- 底部导航 -->
|
||
|
|
<div class="bottom-nav">
|
||
|
|
<div class="nav-item active">
|
||
|
|
<div class="nav-icon">🏠</div>
|
||
|
|
<span>首页</span>
|
||
|
|
</div>
|
||
|
|
<div class="nav-item">
|
||
|
|
<div class="nav-icon">💬</div>
|
||
|
|
<span>消息</span>
|
||
|
|
</div>
|
||
|
|
<div class="nav-item">
|
||
|
|
<div class="nav-icon" style="position: relative;">🛒
|
||
|
|
<div class="cart-badge">23</div>
|
||
|
|
</div>
|
||
|
|
<span>购物车</span>
|
||
|
|
</div>
|
||
|
|
<div class="nav-item">
|
||
|
|
<div class="nav-icon">👤</div>
|
||
|
|
<span>我的</span>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</body>
|
||
|
|
</html>
|