123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <link rel="stylesheet" href="path/to/Common.css">
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <title>饰品商城 - 店铺</title>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
- }
- body {
- background-color: #f5f5f5;
- color: #333;
- font-size: 14px;
- padding-bottom: 60px; /* 为底部tab栏留出空间 */
- }
- /* 顶部标签栏 */
- .header {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- background-color: #fff;
- z-index: 100;
- box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
- }
- .tab-container {
- display: flex;
- align-items: center;
- padding: 10px 0;
- border-bottom: 1px solid #eee;
- }
- .tabs {
- flex: 1;
- overflow-x: auto;
- white-space: nowrap;
- scrollbar-width: none; /* Firefox */
- -ms-overflow-style: none; /* IE and Edge */
- }
- .tabs::-webkit-scrollbar {
- display: none; /* Chrome, Safari, Opera */
- }
- .tab {
- display: inline-block;
- padding: 5px 12px;
- margin: 0 5px;
- border-radius: 15px;
- font-size: 14px;
- color: #666;
- }
- .tab.active {
- background-color: #1890ff;
- color: white;
- }
- .action-buttons {
- display: flex;
- padding: 0 10px;
- }
- .action-btn {
- padding: 5px;
- color: #666;
- font-size: 16px;
- }
- /* 内容区域 */
- .content {
- margin-top: 50px; /* 顶部标签栏高度 */
- padding: 10px;
- }
- /* 店铺信息 */
- .shop-header {
- display: flex;
- align-items: center;
- background-color: white;
- padding: 15px;
- border-radius: 8px;
- margin-bottom: 15px;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- }
- .shop-avatar {
- width: 60px;
- height: 60px;
- border-radius: 50%;
- background-color: #f0f0f0;
- margin-right: 15px;
- overflow: hidden;
- }
- .shop-avatar img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .shop-info {
- flex: 1;
- }
- .shop-name {
- font-size: 18px;
- font-weight: bold;
- margin-bottom: 5px;
- }
- .shop-stats {
- display: flex;
- font-size: 12px;
- color: #666;
- }
- .shop-stat {
- margin-right: 15px;
- }
- .shop-stat i {
- margin-right: 3px;
- }
- .follow-btn {
- padding: 5px 15px;
- background-color: #1890ff;
- color: white;
- border-radius: 15px;
- font-size: 14px;
- border: none;
- }
- /* 店铺导航 */
- .shop-nav {
- display: flex;
- background-color: white;
- border-radius: 8px;
- margin-bottom: 15px;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- }
- .nav-item {
- flex: 1;
- text-align: center;
- padding: 12px 0;
- font-size: 14px;
- color: #666;
- border-bottom: 2px solid transparent;
- }
- .nav-item.active {
- color: #1890ff;
- border-bottom-color: #1890ff;
- }
- /* 店铺公告 */
- .shop-notice {
- background-color: white;
- padding: 15px;
- border-radius: 8px;
- margin-bottom: 15px;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- }
- .notice-title {
- font-size: 14px;
- font-weight: bold;
- margin-bottom: 10px;
- color: #333;
- }
- .notice-content {
- font-size: 13px;
- color: #666;
- line-height: 1.5;
- }
- /* 饰品列表 */
- .item-list {
- display: flex;
- flex-wrap: wrap;
- margin: 0 -5px;
- }
- .item-card {
- width: calc(50% - 10px);
- margin: 5px;
- background-color: white;
- border-radius: 8px;
- overflow: hidden;
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- }
- .item-image {
- position: relative;
- width: 100%;
- padding-top: 56.25%; /* 16:9 宽高比 */
- background-color: #f0f0f0;
- overflow: hidden;
- }
- .item-image img {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- .item-info {
- padding: 10px;
- }
- .item-name {
- font-size: 14px;
- font-weight: bold;
- margin-bottom: 5px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .item-wear {
- font-size: 12px;
- color: #666;
- margin-bottom: 5px;
- }
- .item-price {
- font-size: 16px;
- color: #f56c6c;
- font-weight: bold;
- }
- /* 底部Tab栏 */
- .tab-bar {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- background-color: white;
- border-top: 1px solid #eee;
- z-index: 100;
- }
- .tab-item {
- flex: 1;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- padding: 8px 0;
- color: #666;
- }
- .tab-item.active {
- color: #1890ff;
- }
- .tab-item i {
- font-size: 20px;
- margin-bottom: 2px;
- }
- .tab-item span {
- font-size: 12px;
- }
- </style>
- </head>
- <body>
- <!-- 顶部标签栏 -->
- <div class="header">
- <div class="tab-container">
- <div class="tabs">
- <span class="tab">全部商品</span>
- <span class="tab active">热门商品</span>
- <span class="tab">最新上架</span>
- <span class="tab">促销特惠</span>
- <span class="tab">刀型专区</span>
- <span class="tab">手套专区</span>
- <span class="tab">印花收藏</span>
- </div>
- <div class="action-buttons">
- <div class="action-btn"><i class="bi bi-search"></i></div>
- </div>
- </div>
- </div>
-
- <!-- 内容区域 -->
- <div class="content">
- <!-- 店铺信息 -->
- <div class="shop-header">
- <div class="shop-avatar">
- <img src="https://via.placeholder.com/60" alt="店铺头像">
- </div>
- <div class="shop-info">
- <div class="shop-name">专业饰品交易店</div>
- <div class="shop-stats">
- <div class="shop-stat"><i class="bi bi-star-fill"></i>4.9</div>
- <div class="shop-stat"><i class="bi bi-people"></i>5.2k粉丝</div>
- <div class="shop-stat"><i class="bi bi-box-seam"></i>1.8k商品</div>
- </div>
- </div>
- <button class="follow-btn">+ 关注</button>
- </div>
-
- <!-- 店铺导航 -->
- <div class="shop-nav">
- <div class="nav-item active">商品</div>
- <div class="nav-item">评价</div>
- <div class="nav-item">详情</div>
- <div class="nav-item">活动</div>
- </div>
-
- <!-- 店铺公告 -->
- <div class="shop-notice">
- <div class="notice-title"><i class="bi bi-megaphone"></i> 店铺公告</div>
- <div class="notice-content">
- 本店所有商品均为正品,支持官方验货。满1000元减50元优惠活动进行中,多买多优惠!新用户首次购物享9折优惠!
- </div>
- </div>
-
- <!-- 饰品列表 -->
- <div class="item-list">
- <div class="item-card">
- <div class="item-image">
- <img src="https://via.placeholder.com/300x169" alt="饰品图片">
- </div>
- <div class="item-info">
- <div class="item-name">蝴蝶刀 | 渐变大理石 (崭新出厂)</div>
- <div class="item-wear">磨损: 0.001234</div>
- <div class="item-price">¥ 5,999.00</div>
- </div>
- </div>
- <div class="item-card">
- <div class="item-image">
- <img src="https://via.placeholder.com/300x169" alt="饰品图片">
- </div>
- <div class="item-info">
- <div class="item-name">M9刺刀 | 多普勒 (崭新出厂)</div>
- <div class="item-wear">磨损: 0.002345</div>
- <div class="item-price">¥ 4,299.00</div>
- </div>
- </div>
- <div class="item-card">
- <div class="item-image">
- <img src="https://via.placeholder.com/300x169" alt="饰品图片">
- </div>
- <div class="item-info">
- <div class="item-name">手套 | 深红之网 (战痕累累)</div>
- <div class="item-wear">磨损: 0.456789</div>
- <div class="item-price">¥ 2,499.00</div>
- </div>
- </div>
- <div class="item-card">
- <div class="item-image">
- <img src="https://via.placeholder.com/300x169" alt="饰品图片">
- </div>
- <div class="item-info">
- <div class="item-name">AWP | 二西莫夫 (崭新出厂)</div>
- <div class="item-wear">磨损: 0.012345</div>
- <div class="item-price">¥ 1,299.00</div>
- </div>
- </div>
- <div class="item-card">
- <div class="item-image">
- <img src="https://via.placeholder.com/300x169" alt="饰品图片">
- </div>
- <div class="item-info">
- <div class="item-name">AK-47 | 燃料喷射器 (略有磨损)</div>
- <div class="item-wear">磨损: 0.123456</div>
- <div class="item-price">¥ 899.00</div>
- </div>
- </div>
- <div class="item-card">
- <div class="item-image">
- <img src="https://via.placeholder.com/300x169" alt="饰品图片">
- </div>
- <div class="item-info">
- <div class="item-name">沙漠之鹰 | 印花集 (崭新出厂)</div>
- <div class="item-wear">磨损: 0.012345</div>
- <div class="item-price">¥ 399.00</div>
- </div>
- </div>
- </div>
- </div>
-
- <!-- 底部Tab栏 -->
- <div class="tab-bar">
- <div class="tab-item ">
- <a href="home.html">
- <i class="bi bi-house"></i>
- <span>首页</span>
- </a>
- </div>
- <div class="tab-item">
- <a href="discover.html">
- <i class="bi bi-compass"></i>
- <span>发现</span>
- </a>
- </div>
- <div class="tab-item">
- <a href="Kucun.html">
- <i class="bi bi-bag"></i>
- <span>库存</span>
- </a>
- </div>
- <div class="tab-item active">
- <a href="Dianpu.html">
- <i class="bi bi-shop"></i>
- <span>店铺</span>
- </a>
- </div>
- <div class="tab-item">
- <a href="WOde.html">
- <i class="bi bi-person"></i>
- <span>我</span>
- </a>
- </div>
- </div>
-
- <script>
- // 简单的交互逻辑
- document.addEventListener('DOMContentLoaded', function() {
- // 切换顶部标签
- const tabs = document.querySelectorAll('.tab');
- tabs.forEach(tab => {
- tab.addEventListener('click', function() {
- tabs.forEach(t => t.classList.remove('active'));
- this.classList.add('active');
- });
- });
-
- // 切换店铺导航
- const navItems = document.querySelectorAll('.nav-item');
- navItems.forEach(item => {
- item.addEventListener('click', function() {
- navItems.forEach(i => i.classList.remove('active'));
- this.classList.add('active');
- });
- });
-
- // 切换底部Tab
- const tabItems = document.querySelectorAll('.tab-item');
- tabItems.forEach(item => {
- item.addEventListener('click', function() {
- tabItems.forEach(i => i.classList.remove('active'));
- this.classList.add('active');
- });
- });
-
- // 关注按钮点击
- const followBtn = document.querySelector('.follow-btn');
- followBtn.addEventListener('click', function() {
- if(this.textContent === '+ 关注') {
- this.textContent = '已关注';
- this.style.backgroundColor = '#ccc';
- } else {
- this.textContent = '+ 关注';
- this.style.backgroundColor = '#1890ff';
- }
- });
- });
- </script>
- </body>
- </html>
|