1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>羽绒服DIY - 个性定制</title>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
- <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
- }
-
- :root {
- --primary: #3498db;
- --primary-dark: #2980b9;
- --secondary: #e74c3c;
- --secondary-dark: #c0392b;
- --accent: #9b59b6;
- --accent-dark: #8e44ad;
- --success: #2ecc71;
- --dark: #2c3e50;
- --darker: #1a252f;
- --light: #ecf0f1;
- --lighter: #f9f9f9;
- --gray: #95a5a6;
- --light-gray: #bdc3c7;
- --border: #e0e0e0;
- --shadow: rgba(0, 0, 0, 0.1);
- --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
- --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
- }
-
- body {
- background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
- color: var(--dark);
- line-height: 1.6;
- min-height: 100vh;
- padding: 20px 0 80px;
- overflow-x: hidden;
- }
-
- .container {
- max-width: 480px;
- margin: 0 auto;
- padding: 0 15px;
- }
-
- /* 头部样式 */
- header {
- text-align: center;
- padding: 20px 0;
- margin-bottom: 10px;
- position: relative;
- animation: fadeInDown 0.8s ease;
- }
-
- .logo {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 12px;
- font-size: 1.8rem;
- font-weight: 800;
- color: var(--secondary);
- margin-bottom: 5px;
- }
-
- .logo i {
- font-size: 2.2rem;
- background: linear-gradient(135deg, var(--secondary), var(--accent));
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
-
- .tagline {
- color: var(--gray);
- font-size: 0.95rem;
- margin-top: 5px;
- max-width: 80%;
- margin: 0 auto;
- }
-
- /* 标签页样式 */
- .tabs {
- display: flex;
- background: white;
- border-radius: 50px;
- padding: 6px;
- margin: 25px 0;
- box-shadow: var(--card-shadow);
- position: relative;
- z-index: 10;
- }
-
-
- .tab {
- flex: 1;
- text-align: center;
- padding: 14px 0;
- border-radius: 50px;
- font-weight: 600;
- cursor: pointer;
- transition: var(--transition);
- color: var(--gray);
- position: relative;
- overflow: hidden;
- }
-
- .tab.active {
- color: white;
- background: linear-gradient(135deg, var(--primary), var(--accent));
- box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
- }
-
- .tab i {
- margin-right: 6px;
- font-size: 1.1rem;
- }
-
- /* 面板样式 */
- .panel {
- display: none;
- background: white;
- border-radius: 25px;
- padding: 30px;
- margin-bottom: 25px;
- box-shadow: var(--card-shadow);
- animation: fadeIn 0.6s ease;
- transform-origin: top;
- }
-
- .panel.active {
- display: block;
- }
-
- h2 {
- font-size: 1.5rem;
- margin-bottom: 20px;
- color: var(--dark);
- display: flex;
- align-items: center;
- gap: 12px;
- padding-bottom: 15px;
- border-bottom: 2px solid var(--light);
- }
-
- h2 i {
- background: linear-gradient(135deg, var(--primary), var(--accent));
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- width: 36px;
- height: 36px;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 50%;
- background-color: rgba(52, 152, 219, 0.1);
- }
-
- h3 {
- font-size: 1.2rem;
- margin: 20px 0 15px;
- color: var(--dark);
- }
-
- .section-desc {
- color: var(--gray);
- margin-bottom: 25px;
- font-size: 0.95rem;
- }
-
- /* 羽绒服展示区域 */
- .jacket-display-container {
- position: relative;
- margin: 0 auto 30px;
- perspective: 1000px;
- }
-
- .jacket-display {
- width: 300px;
- height: 420px;
- margin: 0 auto;
- position: relative;
- transform-style: preserve-3d;
- transition: transform 0.8s ease;
- }
-
- .jacket-display:hover {
- transform: rotateY(10deg);
- }
-
- .jacket-base {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: url('https://i.ibb.co/0QrZb0C/jacket-base.png') no-repeat center;
- background-size: contain;
- z-index: 1;
- filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
- }
-
- .jacket-part {
- position: absolute;
- cursor: pointer;
- transition: var(--transition);
- z-index: 2;
- border-radius: 12px;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
- }
-
- .jacket-part:hover {
- transform: translateY(-3px);
- filter: brightness(1.05);
- }
-
- .jacket-part.active-part {
- outline: 3px solid var(--primary);
- outline-offset: 3px;
- filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.5));
- }
-
- .jacket-hood {
- top: 0;
- left: 50px;
- width: 200px;
- height: 120px;
- background: linear-gradient(135deg, #3498db, #2980b9);
- border-radius: 100px 100px 0 0;
- z-index: 3;
- }
-
- .jacket-body {
- top: 100px;
- left: 25px;
- width: 250px;
- height: 250px;
- background: linear-gradient(135deg, #2980b9, #1c6ea4);
- border-radius: 20px;
- }
-
- .jacket-lining {
- top: 120px;
- left: 45px;
- width: 210px;
- height: 210px;
- background: linear-gradient(135deg, #e74c3c, #c0392b);
- border-radius: 15px;
- z-index: 1;
- }
-
- .jacket-sleeve {
- top: 110px;
- width: 80px;
- height: 180px;
- border-radius: 40px;
- }
-
- .jacket-sleeve.left {
- left: 0;
- background: linear-gradient(135deg, #3498db, #2980b9);
- }
-
- .jacket-sleeve.right {
- right: 0;
- background: linear-gradient(135deg, #3498db, #2980b9);
- }
-
- /* 颜色选择器 */
- .color-palette {
- display: flex;
- flex-wrap: wrap;
- gap: 12px;
- justify-content: center;
- margin-top: 20px;
- }
-
- .color-option {
- width: 36px;
- height: 36px;
- border-radius: 50%;
- cursor: pointer;
- border: 3px solid white;
- box-shadow: 0 4px 10px var(--shadow);
- transition: var(--transition);
- position: relative;
- }
-
- .color-option:hover {
- transform: scale(1.15);
- }
-
- .color-option.active {
- transform: scale(1.2);
- box-shadow: 0 0 0 3px white, 0 0 0 6px var(--primary);
- }
-
- .color-option.active::after {
- content: '\f00c';
- font-family: 'Font Awesome 6 Free';
- font-weight: 900;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- color: white;
- font-size: 12px;
- text-shadow: 0 1px 2px rgba(0,0,0,0.3);
- }
-
- /* IP上传区域 */
- .ip-upload {
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 20px;
- margin: 25px 0;
- }
-
- .upload-area {
- width: 100%;
- height: 200px;
- border: 3px dashed var(--light-gray);
- border-radius: 20px;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- transition: var(--transition);
- background: var(--lighter);
- position: relative;
- overflow: hidden;
- }
-
- .upload-area:hover {
- border-color: var(--primary);
- background: rgba(52, 152, 219, 0.05);
- transform: translateY(-5px);
- }
-
- .upload-area i {
- font-size: 3.5rem;
- color: var(--light-gray);
- margin-bottom: 15px;
- transition: var(--transition);
- }
-
- .upload-area:hover i {
- color: var(--primary);
- }
-
- /* 分享区域 */
- .share-section {
- text-align: center;
- padding: 30px 20px;
- background: linear-gradient(135deg, var(--primary), var(--accent));
- border-radius: 20px;
- color: white;
- margin: 25px 0;
- position: relative;
- overflow: hidden;
- }
-
- .share-section::before {
- content: '';
- position: absolute;
- top: -50%;
- left: -50%;
- width: 200%;
- height: 200%;
- background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
- transform: rotate(30deg);
- }
-
- .share-section h3 {
- font-size: 1.4rem;
- margin-bottom: 10px;
- position: relative;
- z-index: 2;
- color: white;
- }
-
- .share-link {
- display: flex;
- background: white;
- border-radius: 50px;
- padding: 3px;
- margin: 25px 0 20px;
- color: var(--dark);
- align-items: center;
- position: relative;
- z-index: 2;
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
- }
-
- .share-link input {
- flex: 1;
- border: none;
- padding: 14px 20px;
- font-size: 0.95rem;
- background: transparent;
- color: var(--dark);
- outline: none;
- }
-
- .share-link button {
- background: var(--accent);
- color: white;
- border: none;
- border-radius: 50px;
- padding: 12px 25px;
- font-weight: 600;
- cursor: pointer;
- transition: var(--transition);
- white-space: nowrap;
- }
-
- .share-link button:hover {
- background: var(--accent-dark);
- }
-
- .share-icons {
- display: flex;
- justify-content: center;
- gap: 25px;
- margin-top: 20px;
- position: relative;
- z-index: 2;
- }
-
- .share-icon {
- width: 55px;
- height: 55px;
- border-radius: 50%;
- background: white;
- display: flex;
- align-items: center;
- justify-content: center;
- color: var(--dark);
- font-size: 1.6rem;
- cursor: pointer;
- transition: var(--transition);
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
- }
-
- .share-icon:hover {
- transform: translateY(-8px);
- }
-
- .share-icon.wechat { color: #2ecc71; }
- .share-icon.weibo { color: #e74c3c; }
- .share-icon.qq { color: #3498db; }
-
- /* 统计卡片 */
- .color-stats {
- display: flex;
- flex-wrap: wrap;
- gap: 15px;
- margin-top: 20px;
- }
-
- .color-stat {
- flex: 1;
- min-width: 140px;
- background: white;
- border-radius: 18px;
- padding: 20px 15px;
- text-align: center;
- box-shadow: var(--card-shadow);
- transition: var(--transition);
- }
-
- .color-stat:hover {
- transform: translateY(-8px);
- box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
- }
-
- .color-stat .color-box {
- width: 70px;
- height: 70px;
- border-radius: 50%;
- margin: 0 auto 15px;
- box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 1.8rem;
- color: white;
- }
-
- .color-stat .stat-name {
- font-weight: 700;
- margin-bottom: 8px;
- font-size: 1.1rem;
- }
-
- .color-stat .stat-count {
- color: var(--gray);
- font-size: 0.95rem;
- }
-
- /* 按钮样式 */
- .action-buttons {
- display: flex;
- gap: 15px;
- margin-top: 30px;
- }
-
- .btn {
- flex: 1;
- padding: 18px;
- border-radius: 50px;
- border: none;
- font-weight: 600;
- font-size: 1.05rem;
- cursor: pointer;
- transition: var(--transition);
- text-align: center;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8px;
- }
-
- .btn-primary {
- background: linear-gradient(135deg, var(--primary), var(--accent));
- color: white;
- box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
- }
-
- .btn-primary:hover {
- box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
- transform: translateY(-3px);
- }
-
- .btn-secondary {
- background: white;
- color: var(--primary);
- border: 2px solid var(--primary);
- }
-
- .btn-secondary:hover {
- background: rgba(52, 152, 219, 0.05);
- transform: translateY(-3px);
- }
-
- /* 底部导航 */
- .bottom-nav {
- position: fixed;
- bottom: 0;
- left: 0;
- right: 0;
- background: white;
- display: flex;
- padding: 10px 0;
- box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
- z-index: 100;
- }
-
- .nav-item {
- flex: 1;
- text-align: center;
- padding: 8px 0;
- color: var(--gray);
- font-size: 0.85rem;
- transition: var(--transition);
- }
-
- .nav-item.active {
- color: var(--primary);
- }
-
- .nav-item i {
- display: block;
- font-size: 1.4rem;
- margin-bottom: 5px;
- }
-
- /* 图表容器 */
- .chart-container {
- background: white;
- border-radius: 20px;
- padding: 20px;
- margin-top: 25px;
- box-shadow: var(--card-shadow);
- height: 300px;
- }
-
- /* 页脚 */
- footer {
- text-align: center;
- padding: 30px 0 20px;
- color: var(--gray);
- font-size: 0.9rem;
- }
-
- /* 设计展示区 */
- .design-gallery {
- display: grid;
- grid-template-columns: repeat(2, 1fr);
- gap: 15px;
- margin-top: 20px;
- }
-
- .design-item {
- background: white;
- border-radius: 15px;
- overflow: hidden;
- box-shadow: var(--card-shadow);
- transition: var(--transition);
- }
-
- .design-item:hover {
- transform: translateY(-5px);
- box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
- }
-
- .design-image {
- height: 160px;
- background: var(--light);
- position: relative;
- overflow: hidden;
- }
-
- .design-image img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
-
- .design-info {
- padding: 15px;
- }
-
- .design-title {
- font-weight: 600;
- margin-bottom: 5px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
-
- .design-author {
- color: var(--gray);
- font-size: 0.85rem;
- }
-
- /* 动画 */
- @keyframes fadeIn {
- from { opacity: 0; transform: translateY(20px); }
- to { opacity: 1; transform: translateY(0); }
- }
-
- @keyframes fadeInDown {
- from { opacity: 0; transform: translateY(-20px); }
- to { opacity: 1; transform: translateY(0); }
- }
-
- @keyframes pulse {
- 0% { transform: scale(1); }
- 50% { transform: scale(1.05); }
- 100% { transform: scale(1); }
- }
-
- .pulse {
- animation: pulse 2s infinite;
- }
-
- /* 响应式调整 */
- @media (max-width: 480px) {
- .container {
- padding: 0 10px;
- }
-
- .jacket-display {
- width: 280px;
- height: 400px;
- }
-
- .color-stats {
- flex-direction: column;
- }
-
- .color-stat {
- min-width: 100%;
- }
-
- h2 {
- font-size: 1.4rem;
- }
-
- .panel {
- padding: 25px 20px;
- }
-
- .color-option {
- width: 32px;
- height: 32px;
- }
-
- .design-gallery {
- grid-template-columns: 1fr;
- }
- }
- </style>
- </head>
- <body>
- <div class="container">
- <header>
- <div class="logo">
- <i class="fas fa-vest"></i>
- <span>羽绒服DIY</span>
- </div>
- <p class="tagline">创造属于你的个性羽绒服,展现独特时尚风格</p>
- </header>
-
- <div class="tabs">
- <div class="tab active" data-tab="home">
- <i class="fas fa-home"></i> 首页
- </div>
- <div class="tab" data-tab="ip">
- <i class="fas fa-crown"></i> IP定制
- </div>
- <div class="tab" data-tab="design">
- <i class="fas fa-palette"></i> 设计
- </div>
- <div class="tab" data-tab="my">
- <i class="fas fa-user"></i> 我的
- </div>
- </div>
-
- <!-- 首页面板 -->
- <div class="panel active" id="home-panel">
- <h2><i class="fas fa-home"></i> 热门设计</h2>
- <p class="section-desc">浏览最受欢迎的羽绒服设计,获取灵感</p>
-
- <div class="design-gallery">
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="设计1">
- </div>
- <div class="design-info">
- <div class="design-title">星空主题羽绒服</div>
- <div class="design-author">by 设计师小王</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="设计2">
- </div>
- <div class="design-info">
- <div class="design-title">火焰纹路设计</div>
- <div class="design-author">by 创意达人</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="设计3">
- </div>
- <div class="design-info">
- <div class="design-title">极简主义风格</div>
- <div class="design-author">by 极简生活</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="设计4">
- </div>
- <div class="design-info">
- <div class="design-title">复古拼接设计</div>
- <div class="design-author">by 复古爱好者</div>
- </div>
- </div>
- </div>
-
- <h3>本周流行趋势</h3>
- <div class="color-stats">
- <div class="color-stat">
- <div class="color-box" style="background: linear-gradient(135deg, #3498db, #2c3e50);">
- <i class="fas fa-water"></i>
- </div>
- <div class="stat-name">深海蓝黑</div>
- <div class="stat-count">5,678 次使用</div>
- </div>
- <div class="color-stat">
- <div class="color-box" style="background: linear-gradient(135deg, #e74c3c, #f1c40f);">
- <i class="fas fa-sun"></i>
- </div>
- <div class="stat-name">日落橙黄</div>
- <div class="stat-count">4,987 次使用</div>
- </div>
- </div>
- </div>
-
- <!-- IP定制面板 -->
- <div class="panel" id="ip-panel">
- <h2><i class="fas fa-crown"></i> IP联名定制</h2>
- <p class="section-desc">从热门IP图片中提取颜色,应用到你的羽绒服设计</p>
-
- <div class="ip-upload">
- <div class="upload-area" id="uploadArea">
- <i class="fas fa-cloud-upload-alt"></i>
- <p>点击上传图片或拖放文件到这里</p>
- <small>支持JPG、PNG格式,最大5MB</small>
- </div>
- <button class="btn btn-primary">
- <i class="fas fa-magic"></i> 识别图片颜色
- </button>
- </div>
-
- <h3>热门IP推荐</h3>
- <div class="design-gallery">
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="漫威设计">
- </div>
- <div class="design-info">
- <div class="design-title">漫威英雄系列</div>
- <div class="design-author">官方授权</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="迪士尼设计">
- </div>
- <div class="design-info">
- <div class="design-title">迪士尼公主</div>
- <div class="design-author">官方授权</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="国潮设计">
- </div>
- <div class="design-info">
- <div class="design-title">国潮故宫联名</div>
- <div class="design-author">官方授权</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="动漫设计">
- </div>
- <div class="design-info">
- <div class="design-title">热门动漫IP</div>
- <div class="design-author">官方授权</div>
- </div>
- </div>
- </div>
- </div>
-
- <!-- 设计面板 -->
- <div class="panel" id="design-panel">
- <h2><i class="fas fa-palette"></i> 个性设计</h2>
- <p class="section-desc">选择羽绒服的不同部位并自定义颜色,打造属于你的独特设计</p>
-
- <div class="jacket-display-container">
- <div class="jacket-display">
- <div class="jacket-base"></div>
- <div class="jacket-part jacket-lining" data-part="lining"></div>
- <div class="jacket-part jacket-hood active-part" data-part="hood"></div>
- <div class="jacket-part jacket-body" data-part="body"></div>
- <div class="jacket-part jacket-sleeve left" data-part="sleeve-left"></div>
- <div class="jacket-part jacket-sleeve right" data-part="sleeve-right"></div>
- </div>
- </div>
-
- <h3>选择颜色</h3>
- <div class="color-palette">
- <div class="color-option active" style="background-color: #3498db;" data-color="#3498db"></div>
- <div class="color-option" style="background-color: #e74c3c;" data-color="#e74c3c"></div>
- <div class="color-option" style="background-color: #2ecc71;" data-color="#2ecc71"></div>
- <div class="color-option" style="background-color: #f1c40f;" data-color="#f1c40f"></div>
- <div class="color-option" style="background-color: #9b59b6;" data-color="#9b59b6"></div>
- <div class="color-option" style="background-color: #1abc9c;" data-color="#1abc9c"></div>
- <div class="color-option" style="background-color: #e67e22;" data-color="#e67e22"></div>
- <div class="color-option" style="background-color: #2c3e50;" data-color="#2c3e50"></div>
- <div class="color-option" style="background-color: #ecf0f1;" data-color="#ecf0f1"></div>
- <div class="color-option" style="background-color: #e84393;" data-color="#e84393"></div>
- <div class="color-option" style="background-color: #00cec9;" data-color="#00cec9"></div>
- <div class="color-option" style="background-color: #fd79a8;" data-color="#fd79a8"></div>
- <div class="color-option" style="background-color: #6c5ce7;" data-color="#6c5ce7"></div>
- <div class="color-option" style="background-color: #00b894;" data-color="#00b894"></div>
- <div class="color-option" style="background-color: #fdcb6e;" data-color="#fdcb6e"></div>
- <div class="color-option" style="background-color: #e17055;" data-color="#e17055"></div>
- <div class="color-option" style="background-color: #0984e3;" data-color="#0984e3"></div>
- <div class="color-option" style="background-color: #d63031;" data-color="#d63031"></div>
- <div class="color-option" style="background-color: #636e72;" data-color="#636e72"></div>
- <div class="color-option" style="background-color: #ffeaa7;" data-color="#ffeaa7"></div>
- </div>
-
-
- <div class="action-buttons">
- <button class="btn btn-secondary" id="resetBtn">
- <i class="fas fa-redo"></i> 重置
- </button>
- <button class="btn btn-primary pulse" id="saveBtn">
- <i class="fas fa-save"></i> 保存设计
- </button>
- </div>
-
- <h3>我的设计</h3>
- <div class="design-gallery">
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="我的设计1">
- </div>
- <div class="design-info">
- <div class="design-title">蓝色风暴</div>
- <div class="design-author">刚刚保存</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="我的设计2">
- </div>
- <div class="design-info">
- <div class="design-title">红黑经典</div>
- <div class="design-author">昨天</div>
- </div>
- </div>
- </div>
- </div>
-
- <!-- 我的面板 -->
- <div class="panel" id="my-panel">
- <h2><i class="fas fa-user"></i> 我的账户</h2>
- <p class="section-desc">管理你的设计、收藏和个人信息</p>
-
- <div class="color-stat" style="max-width: 100%; text-align: left; display: flex; align-items: center; gap: 20px;">
- <div class="color-box" style="background: linear-gradient(135deg, var(--primary), var(--accent)); width: 80px; height: 80px;">
- <i class="fas fa-user" style="font-size: 2rem;"></i>
- </div>
- <div>
- <div class="stat-name">用户昵称</div>
- <div class="stat-count">会员等级: 黄金会员</div>
- </div>
- </div>
-
- <h3>我的设计 (2)</h3>
- <div class="design-gallery">
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="我的设计1">
- </div>
- <div class="design-info">
- <div class="design-title">蓝色风暴</div>
- <div class="design-author">3天前</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="我的设计2">
- </div>
- <div class="design-info">
- <div class="design-title">红黑经典</div>
- <div class="design-author">1周前</div>
- </div>
- </div>
- </div>
-
- <h3>我的收藏 (4)</h3>
- <div class="design-gallery">
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="收藏设计1">
- </div>
- <div class="design-info">
- <div class="design-title">星空主题</div>
- <div class="design-author">by 设计师小王</div>
- </div>
- </div>
-
- <div class="design-item">
- <div class="design-image">
- <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="收藏设计2">
- </div>
- <div class="design-info">
- <div class="design-title">火焰纹路</div>
- <div class="design-author">by 创意达人</div>
- </div>
- </div>
- </div>
-
- <div class="action-buttons" style="margin-top: 30px;">
- <button class="btn btn-secondary">
- <i class="fas fa-cog"></i> 设置
- </button>
- <button class="btn btn-primary">
- <i class="fas fa-sign-out-alt"></i> 退出登录
- </button>
- </div>
- </div>
-
- <footer>
- <p>© 2023 羽绒服DIY - 创造你的个性时尚</p>
- <p>让每个人都能成为设计师</p>
- </footer>
- </div>
-
- <!-- 底部导航 -->
- <div class="bottom-nav">
- <div class="nav-item active" data-tab="home">
- <i class="fas fa-home"></i>
- <span>首页</span>
- </div>
- <div class="nav-item" data-tab="ip">
- <i class="fas fa-crown"></i>
- <span>IP定制</span>
- </div>
- <div class="nav-item" data-tab="design">
- <i class="fas fa-palette"></i>
- <span>设计</span>
- </div>
- <div class="nav-item" data-tab="my">
- <i class="fas fa-user"></i>
- <span>我的</span>
- </div>
- </div>
-
- <script>
- // 页面加载完成后执行
- document.addEventListener('DOMContentLoaded', function() {
- // 标签切换功能
- function switchTab(tabName) {
- // 移除所有活动标签
- document.querySelectorAll('.tab, .nav-item').forEach(t => t.classList.remove('active'));
- // 添加当前活动标签
- document.querySelectorAll(`[data-tab="${tabName}"]`).forEach(t => t.classList.add('active'));
-
- // 隐藏所有面板
- document.querySelectorAll('.panel').forEach(panel => panel.classList.remove('active'));
- // 显示对应面板
- document.getElementById(`${tabName}-panel`).classList.add('active');
- }
-
- document.querySelectorAll('.tab, .nav-item').forEach(tab => {
- tab.addEventListener('click', () => {
- const tabName = tab.getAttribute('data-tab');
- switchTab(tabName);
- });
- });
-
- // 部位选择功能
- document.querySelectorAll('.jacket-part').forEach(part => {
- part.addEventListener('click', () => {
- document.querySelectorAll('.jacket-part').forEach(p => p.classList.remove('active-part'));
- part.classList.add('active-part');
- });
- });
-
- // 颜色选择功能
- document.querySelectorAll('.color-option').forEach(color => {
- color.addEventListener('click', () => {
- const selectedColor = color.getAttribute('data-color');
- const activePart = document.querySelector('.jacket-part.active-part');
-
- if (activePart) {
- activePart.style.background = `linear-gradient(135deg, ${selectedColor}, ${adjustColor(selectedColor, -20)})`;
- }
-
- // 更新活动颜色指示器
- document.querySelectorAll('.color-option').forEach(c => c.classList.remove('active'));
- color.classList.add('active');
- });
- });
-
- // 辅助函数:调整颜色亮度
- function adjustColor(color, amount) {
- return '#' + color.replace(/^#/, '').replace(/../g, color => ('0'+Math.min(255, Math.max(0, parseInt(color, 16) + amount)).toString(16)).substr(-2));
- }
-
- // 复制链接功能
- document.getElementById('copyBtn')?.addEventListener('click', () => {
- const linkInput = document.getElementById('shareLink');
- if (linkInput) {
- linkInput.select();
- document.execCommand('copy');
-
- // 显示复制成功提示
- const btnText = document.getElementById('copyBtn');
- btnText.innerHTML = '<i class="fas fa-check"></i> 已复制';
-
- setTimeout(() => {
- btnText.innerHTML = '<i class="fas fa-copy"></i> 复制链接';
- }, 2000);
- }
- });
-
- // 上传区域交互
- const uploadArea = document.getElementById('uploadArea');
- if (uploadArea) {
- uploadArea.addEventListener('dragover', (e) => {
- e.preventDefault();
- uploadArea.style.borderColor = 'var(--primary)';
- uploadArea.style.backgroundColor = 'rgba(52, 152, 219, 0.1)';
- });
-
- uploadArea.addEventListener('dragleave', () => {
- uploadArea.style.borderColor = 'var(--light-gray)';
- uploadArea.style.backgroundColor = 'var(--lighter)';
- });
-
- uploadArea.addEventListener('click', () => {
- alert('图片上传功能需要后端支持,此处为前端演示');
- });
- }
-
- // 重置按钮功能
- document.getElementById('resetBtn')?.addEventListener('click', () => {
- document.querySelectorAll('.jacket-part').forEach(part => {
- part.style.background = '';
- });
-
- // 重置颜色选择器
- document.querySelectorAll('.color-option').forEach(color => {
- color.classList.remove('active');
- });
-
- // 设置默认颜色为选中
- document.querySelector('.color-option').classList.add('active');
-
- // 设置默认激活部位
- document.querySelectorAll('.jacket-part').forEach(p => p.classList.remove('active-part'));
- document.querySelector('.jacket-hood').classList.add('active-part');
- });
-
- // 保存按钮功能
- document.getElementById('saveBtn')?.addEventListener('click', () => {
- alert('设计已保存!您可以在"我的"页面查看保存的设计。');
- switchTab('my');
- });
-
- // 初始化图表
- const ctx = document.getElementById('colorChart')?.getContext('2d');
- if (ctx) {
- new Chart(ctx, {
- type: 'bar',
- data: {
- labels: ['海洋蓝', '活力红', '森林绿', '阳光黄', '梦幻紫', '珊瑚橙'],
- datasets: [{
- label: '使用次数',
- data: [1850, 1620, 1540, 1420, 1360, 1280],
- backgroundColor: [
- '#3498db',
- '#e74c3c',
- '#2ecc71',
- '#f1c40f',
- '#9b59b6',
- '#ff7f50'
- ],
- borderColor: [
- '#2980b9',
- '#c0392b',
- '#27ae60',
- '#f39c12',
- '#8e44ad',
- '#ff6347'
- ],
- borderWidth: 1,
- borderRadius: 10
- }]
- },
- options: {
- responsive: true,
- maintainAspectRatio: false,
- plugins: {
- legend: {
- display: false
- },
- title: {
- display: true,
- text: '颜色使用频率统计',
- font: {
- size: 16
- }
- }
- },
- scales: {
- y: {
- beginAtZero: true,
- grid: {
- color: 'rgba(0, 0, 0, 0.05)'
-
- }
- },
- x: {
- grid: {
- display: false
- }
- }
- }
- }
- });
- }
- });
- </script>
- </body>
- </html>
|