ai-clothing-design.html 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>羽绒服DIY - 个性定制</title>
  7. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  8. <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  9. <style>
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: border-box;
  14. font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  15. }
  16. :root {
  17. --primary: #3498db;
  18. --primary-dark: #2980b9;
  19. --secondary: #e74c3c;
  20. --secondary-dark: #c0392b;
  21. --accent: #9b59b6;
  22. --accent-dark: #8e44ad;
  23. --success: #2ecc71;
  24. --dark: #2c3e50;
  25. --darker: #1a252f;
  26. --light: #ecf0f1;
  27. --lighter: #f9f9f9;
  28. --gray: #95a5a6;
  29. --light-gray: #bdc3c7;
  30. --border: #e0e0e0;
  31. --shadow: rgba(0, 0, 0, 0.1);
  32. --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  33. --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  34. }
  35. body {
  36. background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  37. color: var(--dark);
  38. line-height: 1.6;
  39. min-height: 100vh;
  40. padding: 20px 0 80px;
  41. overflow-x: hidden;
  42. }
  43. .container {
  44. max-width: 480px;
  45. margin: 0 auto;
  46. padding: 0 15px;
  47. }
  48. /* 头部样式 */
  49. header {
  50. text-align: center;
  51. padding: 20px 0;
  52. margin-bottom: 10px;
  53. position: relative;
  54. animation: fadeInDown 0.8s ease;
  55. }
  56. .logo {
  57. display: flex;
  58. align-items: center;
  59. justify-content: center;
  60. gap: 12px;
  61. font-size: 1.8rem;
  62. font-weight: 800;
  63. color: var(--secondary);
  64. margin-bottom: 5px;
  65. }
  66. .logo i {
  67. font-size: 2.2rem;
  68. background: linear-gradient(135deg, var(--secondary), var(--accent));
  69. -webkit-background-clip: text;
  70. -webkit-text-fill-color: transparent;
  71. }
  72. .tagline {
  73. color: var(--gray);
  74. font-size: 0.95rem;
  75. margin-top: 5px;
  76. max-width: 80%;
  77. margin: 0 auto;
  78. }
  79. /* 标签页样式 */
  80. .tabs {
  81. display: flex;
  82. background: white;
  83. border-radius: 50px;
  84. padding: 6px;
  85. margin: 25px 0;
  86. box-shadow: var(--card-shadow);
  87. position: relative;
  88. z-index: 10;
  89. }
  90. .tab {
  91. flex: 1;
  92. text-align: center;
  93. padding: 14px 0;
  94. border-radius: 50px;
  95. font-weight: 600;
  96. cursor: pointer;
  97. transition: var(--transition);
  98. color: var(--gray);
  99. position: relative;
  100. overflow: hidden;
  101. }
  102. .tab.active {
  103. color: white;
  104. background: linear-gradient(135deg, var(--primary), var(--accent));
  105. box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
  106. }
  107. .tab i {
  108. margin-right: 6px;
  109. font-size: 1.1rem;
  110. }
  111. /* 面板样式 */
  112. .panel {
  113. display: none;
  114. background: white;
  115. border-radius: 25px;
  116. padding: 30px;
  117. margin-bottom: 25px;
  118. box-shadow: var(--card-shadow);
  119. animation: fadeIn 0.6s ease;
  120. transform-origin: top;
  121. }
  122. .panel.active {
  123. display: block;
  124. }
  125. h2 {
  126. font-size: 1.5rem;
  127. margin-bottom: 20px;
  128. color: var(--dark);
  129. display: flex;
  130. align-items: center;
  131. gap: 12px;
  132. padding-bottom: 15px;
  133. border-bottom: 2px solid var(--light);
  134. }
  135. h2 i {
  136. background: linear-gradient(135deg, var(--primary), var(--accent));
  137. -webkit-background-clip: text;
  138. -webkit-text-fill-color: transparent;
  139. width: 36px;
  140. height: 36px;
  141. display: flex;
  142. align-items: center;
  143. justify-content: center;
  144. border-radius: 50%;
  145. background-color: rgba(52, 152, 219, 0.1);
  146. }
  147. h3 {
  148. font-size: 1.2rem;
  149. margin: 20px 0 15px;
  150. color: var(--dark);
  151. }
  152. .section-desc {
  153. color: var(--gray);
  154. margin-bottom: 25px;
  155. font-size: 0.95rem;
  156. }
  157. /* 羽绒服展示区域 */
  158. .jacket-display-container {
  159. position: relative;
  160. margin: 0 auto 30px;
  161. perspective: 1000px;
  162. }
  163. .jacket-display {
  164. width: 300px;
  165. height: 420px;
  166. margin: 0 auto;
  167. position: relative;
  168. transform-style: preserve-3d;
  169. transition: transform 0.8s ease;
  170. }
  171. .jacket-display:hover {
  172. transform: rotateY(10deg);
  173. }
  174. .jacket-base {
  175. position: absolute;
  176. top: 0;
  177. left: 0;
  178. width: 100%;
  179. height: 100%;
  180. background: url('https://i.ibb.co/0QrZb0C/jacket-base.png') no-repeat center;
  181. background-size: contain;
  182. z-index: 1;
  183. filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
  184. }
  185. .jacket-part {
  186. position: absolute;
  187. cursor: pointer;
  188. transition: var(--transition);
  189. z-index: 2;
  190. border-radius: 12px;
  191. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  192. }
  193. .jacket-part:hover {
  194. transform: translateY(-3px);
  195. filter: brightness(1.05);
  196. }
  197. .jacket-part.active-part {
  198. outline: 3px solid var(--primary);
  199. outline-offset: 3px;
  200. filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.5));
  201. }
  202. .jacket-hood {
  203. top: 0;
  204. left: 50px;
  205. width: 200px;
  206. height: 120px;
  207. background: linear-gradient(135deg, #3498db, #2980b9);
  208. border-radius: 100px 100px 0 0;
  209. z-index: 3;
  210. }
  211. .jacket-body {
  212. top: 100px;
  213. left: 25px;
  214. width: 250px;
  215. height: 250px;
  216. background: linear-gradient(135deg, #2980b9, #1c6ea4);
  217. border-radius: 20px;
  218. }
  219. .jacket-lining {
  220. top: 120px;
  221. left: 45px;
  222. width: 210px;
  223. height: 210px;
  224. background: linear-gradient(135deg, #e74c3c, #c0392b);
  225. border-radius: 15px;
  226. z-index: 1;
  227. }
  228. .jacket-sleeve {
  229. top: 110px;
  230. width: 80px;
  231. height: 180px;
  232. border-radius: 40px;
  233. }
  234. .jacket-sleeve.left {
  235. left: 0;
  236. background: linear-gradient(135deg, #3498db, #2980b9);
  237. }
  238. .jacket-sleeve.right {
  239. right: 0;
  240. background: linear-gradient(135deg, #3498db, #2980b9);
  241. }
  242. /* 颜色选择器 */
  243. .color-palette {
  244. display: flex;
  245. flex-wrap: wrap;
  246. gap: 12px;
  247. justify-content: center;
  248. margin-top: 20px;
  249. }
  250. .color-option {
  251. width: 36px;
  252. height: 36px;
  253. border-radius: 50%;
  254. cursor: pointer;
  255. border: 3px solid white;
  256. box-shadow: 0 4px 10px var(--shadow);
  257. transition: var(--transition);
  258. position: relative;
  259. }
  260. .color-option:hover {
  261. transform: scale(1.15);
  262. }
  263. .color-option.active {
  264. transform: scale(1.2);
  265. box-shadow: 0 0 0 3px white, 0 0 0 6px var(--primary);
  266. }
  267. .color-option.active::after {
  268. content: '\f00c';
  269. font-family: 'Font Awesome 6 Free';
  270. font-weight: 900;
  271. position: absolute;
  272. top: 50%;
  273. left: 50%;
  274. transform: translate(-50%, -50%);
  275. color: white;
  276. font-size: 12px;
  277. text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  278. }
  279. /* IP上传区域 */
  280. .ip-upload {
  281. display: flex;
  282. flex-direction: column;
  283. align-items: center;
  284. gap: 20px;
  285. margin: 25px 0;
  286. }
  287. .upload-area {
  288. width: 100%;
  289. height: 200px;
  290. border: 3px dashed var(--light-gray);
  291. border-radius: 20px;
  292. display: flex;
  293. flex-direction: column;
  294. align-items: center;
  295. justify-content: center;
  296. cursor: pointer;
  297. transition: var(--transition);
  298. background: var(--lighter);
  299. position: relative;
  300. overflow: hidden;
  301. }
  302. .upload-area:hover {
  303. border-color: var(--primary);
  304. background: rgba(52, 152, 219, 0.05);
  305. transform: translateY(-5px);
  306. }
  307. .upload-area i {
  308. font-size: 3.5rem;
  309. color: var(--light-gray);
  310. margin-bottom: 15px;
  311. transition: var(--transition);
  312. }
  313. .upload-area:hover i {
  314. color: var(--primary);
  315. }
  316. /* 分享区域 */
  317. .share-section {
  318. text-align: center;
  319. padding: 30px 20px;
  320. background: linear-gradient(135deg, var(--primary), var(--accent));
  321. border-radius: 20px;
  322. color: white;
  323. margin: 25px 0;
  324. position: relative;
  325. overflow: hidden;
  326. }
  327. .share-section::before {
  328. content: '';
  329. position: absolute;
  330. top: -50%;
  331. left: -50%;
  332. width: 200%;
  333. height: 200%;
  334. background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  335. transform: rotate(30deg);
  336. }
  337. .share-section h3 {
  338. font-size: 1.4rem;
  339. margin-bottom: 10px;
  340. position: relative;
  341. z-index: 2;
  342. color: white;
  343. }
  344. .share-link {
  345. display: flex;
  346. background: white;
  347. border-radius: 50px;
  348. padding: 3px;
  349. margin: 25px 0 20px;
  350. color: var(--dark);
  351. align-items: center;
  352. position: relative;
  353. z-index: 2;
  354. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  355. }
  356. .share-link input {
  357. flex: 1;
  358. border: none;
  359. padding: 14px 20px;
  360. font-size: 0.95rem;
  361. background: transparent;
  362. color: var(--dark);
  363. outline: none;
  364. }
  365. .share-link button {
  366. background: var(--accent);
  367. color: white;
  368. border: none;
  369. border-radius: 50px;
  370. padding: 12px 25px;
  371. font-weight: 600;
  372. cursor: pointer;
  373. transition: var(--transition);
  374. white-space: nowrap;
  375. }
  376. .share-link button:hover {
  377. background: var(--accent-dark);
  378. }
  379. .share-icons {
  380. display: flex;
  381. justify-content: center;
  382. gap: 25px;
  383. margin-top: 20px;
  384. position: relative;
  385. z-index: 2;
  386. }
  387. .share-icon {
  388. width: 55px;
  389. height: 55px;
  390. border-radius: 50%;
  391. background: white;
  392. display: flex;
  393. align-items: center;
  394. justify-content: center;
  395. color: var(--dark);
  396. font-size: 1.6rem;
  397. cursor: pointer;
  398. transition: var(--transition);
  399. box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  400. }
  401. .share-icon:hover {
  402. transform: translateY(-8px);
  403. }
  404. .share-icon.wechat { color: #2ecc71; }
  405. .share-icon.weibo { color: #e74c3c; }
  406. .share-icon.qq { color: #3498db; }
  407. /* 统计卡片 */
  408. .color-stats {
  409. display: flex;
  410. flex-wrap: wrap;
  411. gap: 15px;
  412. margin-top: 20px;
  413. }
  414. .color-stat {
  415. flex: 1;
  416. min-width: 140px;
  417. background: white;
  418. border-radius: 18px;
  419. padding: 20px 15px;
  420. text-align: center;
  421. box-shadow: var(--card-shadow);
  422. transition: var(--transition);
  423. }
  424. .color-stat:hover {
  425. transform: translateY(-8px);
  426. box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
  427. }
  428. .color-stat .color-box {
  429. width: 70px;
  430. height: 70px;
  431. border-radius: 50%;
  432. margin: 0 auto 15px;
  433. box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
  434. display: flex;
  435. align-items: center;
  436. justify-content: center;
  437. font-size: 1.8rem;
  438. color: white;
  439. }
  440. .color-stat .stat-name {
  441. font-weight: 700;
  442. margin-bottom: 8px;
  443. font-size: 1.1rem;
  444. }
  445. .color-stat .stat-count {
  446. color: var(--gray);
  447. font-size: 0.95rem;
  448. }
  449. /* 按钮样式 */
  450. .action-buttons {
  451. display: flex;
  452. gap: 15px;
  453. margin-top: 30px;
  454. }
  455. .btn {
  456. flex: 1;
  457. padding: 18px;
  458. border-radius: 50px;
  459. border: none;
  460. font-weight: 600;
  461. font-size: 1.05rem;
  462. cursor: pointer;
  463. transition: var(--transition);
  464. text-align: center;
  465. display: flex;
  466. align-items: center;
  467. justify-content: center;
  468. gap: 8px;
  469. }
  470. .btn-primary {
  471. background: linear-gradient(135deg, var(--primary), var(--accent));
  472. color: white;
  473. box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
  474. }
  475. .btn-primary:hover {
  476. box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
  477. transform: translateY(-3px);
  478. }
  479. .btn-secondary {
  480. background: white;
  481. color: var(--primary);
  482. border: 2px solid var(--primary);
  483. }
  484. .btn-secondary:hover {
  485. background: rgba(52, 152, 219, 0.05);
  486. transform: translateY(-3px);
  487. }
  488. /* 底部导航 */
  489. .bottom-nav {
  490. position: fixed;
  491. bottom: 0;
  492. left: 0;
  493. right: 0;
  494. background: white;
  495. display: flex;
  496. padding: 10px 0;
  497. box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
  498. z-index: 100;
  499. }
  500. .nav-item {
  501. flex: 1;
  502. text-align: center;
  503. padding: 8px 0;
  504. color: var(--gray);
  505. font-size: 0.85rem;
  506. transition: var(--transition);
  507. }
  508. .nav-item.active {
  509. color: var(--primary);
  510. }
  511. .nav-item i {
  512. display: block;
  513. font-size: 1.4rem;
  514. margin-bottom: 5px;
  515. }
  516. /* 图表容器 */
  517. .chart-container {
  518. background: white;
  519. border-radius: 20px;
  520. padding: 20px;
  521. margin-top: 25px;
  522. box-shadow: var(--card-shadow);
  523. height: 300px;
  524. }
  525. /* 页脚 */
  526. footer {
  527. text-align: center;
  528. padding: 30px 0 20px;
  529. color: var(--gray);
  530. font-size: 0.9rem;
  531. }
  532. /* 设计展示区 */
  533. .design-gallery {
  534. display: grid;
  535. grid-template-columns: repeat(2, 1fr);
  536. gap: 15px;
  537. margin-top: 20px;
  538. }
  539. .design-item {
  540. background: white;
  541. border-radius: 15px;
  542. overflow: hidden;
  543. box-shadow: var(--card-shadow);
  544. transition: var(--transition);
  545. }
  546. .design-item:hover {
  547. transform: translateY(-5px);
  548. box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
  549. }
  550. .design-image {
  551. height: 160px;
  552. background: var(--light);
  553. position: relative;
  554. overflow: hidden;
  555. }
  556. .design-image img {
  557. width: 100%;
  558. height: 100%;
  559. object-fit: cover;
  560. }
  561. .design-info {
  562. padding: 15px;
  563. }
  564. .design-title {
  565. font-weight: 600;
  566. margin-bottom: 5px;
  567. white-space: nowrap;
  568. overflow: hidden;
  569. text-overflow: ellipsis;
  570. }
  571. .design-author {
  572. color: var(--gray);
  573. font-size: 0.85rem;
  574. }
  575. /* 动画 */
  576. @keyframes fadeIn {
  577. from { opacity: 0; transform: translateY(20px); }
  578. to { opacity: 1; transform: translateY(0); }
  579. }
  580. @keyframes fadeInDown {
  581. from { opacity: 0; transform: translateY(-20px); }
  582. to { opacity: 1; transform: translateY(0); }
  583. }
  584. @keyframes pulse {
  585. 0% { transform: scale(1); }
  586. 50% { transform: scale(1.05); }
  587. 100% { transform: scale(1); }
  588. }
  589. .pulse {
  590. animation: pulse 2s infinite;
  591. }
  592. /* 响应式调整 */
  593. @media (max-width: 480px) {
  594. .container {
  595. padding: 0 10px;
  596. }
  597. .jacket-display {
  598. width: 280px;
  599. height: 400px;
  600. }
  601. .color-stats {
  602. flex-direction: column;
  603. }
  604. .color-stat {
  605. min-width: 100%;
  606. }
  607. h2 {
  608. font-size: 1.4rem;
  609. }
  610. .panel {
  611. padding: 25px 20px;
  612. }
  613. .color-option {
  614. width: 32px;
  615. height: 32px;
  616. }
  617. .design-gallery {
  618. grid-template-columns: 1fr;
  619. }
  620. }
  621. </style>
  622. </head>
  623. <body>
  624. <div class="container">
  625. <header>
  626. <div class="logo">
  627. <i class="fas fa-vest"></i>
  628. <span>羽绒服DIY</span>
  629. </div>
  630. <p class="tagline">创造属于你的个性羽绒服,展现独特时尚风格</p>
  631. </header>
  632. <div class="tabs">
  633. <div class="tab active" data-tab="home">
  634. <i class="fas fa-home"></i> 首页
  635. </div>
  636. <div class="tab" data-tab="ip">
  637. <i class="fas fa-crown"></i> IP定制
  638. </div>
  639. <div class="tab" data-tab="design">
  640. <i class="fas fa-palette"></i> 设计
  641. </div>
  642. <div class="tab" data-tab="my">
  643. <i class="fas fa-user"></i> 我的
  644. </div>
  645. </div>
  646. <!-- 首页面板 -->
  647. <div class="panel active" id="home-panel">
  648. <h2><i class="fas fa-home"></i> 热门设计</h2>
  649. <p class="section-desc">浏览最受欢迎的羽绒服设计,获取灵感</p>
  650. <div class="design-gallery">
  651. <div class="design-item">
  652. <div class="design-image">
  653. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="设计1">
  654. </div>
  655. <div class="design-info">
  656. <div class="design-title">星空主题羽绒服</div>
  657. <div class="design-author">by 设计师小王</div>
  658. </div>
  659. </div>
  660. <div class="design-item">
  661. <div class="design-image">
  662. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="设计2">
  663. </div>
  664. <div class="design-info">
  665. <div class="design-title">火焰纹路设计</div>
  666. <div class="design-author">by 创意达人</div>
  667. </div>
  668. </div>
  669. <div class="design-item">
  670. <div class="design-image">
  671. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="设计3">
  672. </div>
  673. <div class="design-info">
  674. <div class="design-title">极简主义风格</div>
  675. <div class="design-author">by 极简生活</div>
  676. </div>
  677. </div>
  678. <div class="design-item">
  679. <div class="design-image">
  680. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="设计4">
  681. </div>
  682. <div class="design-info">
  683. <div class="design-title">复古拼接设计</div>
  684. <div class="design-author">by 复古爱好者</div>
  685. </div>
  686. </div>
  687. </div>
  688. <h3>本周流行趋势</h3>
  689. <div class="color-stats">
  690. <div class="color-stat">
  691. <div class="color-box" style="background: linear-gradient(135deg, #3498db, #2c3e50);">
  692. <i class="fas fa-water"></i>
  693. </div>
  694. <div class="stat-name">深海蓝黑</div>
  695. <div class="stat-count">5,678 次使用</div>
  696. </div>
  697. <div class="color-stat">
  698. <div class="color-box" style="background: linear-gradient(135deg, #e74c3c, #f1c40f);">
  699. <i class="fas fa-sun"></i>
  700. </div>
  701. <div class="stat-name">日落橙黄</div>
  702. <div class="stat-count">4,987 次使用</div>
  703. </div>
  704. </div>
  705. </div>
  706. <!-- IP定制面板 -->
  707. <div class="panel" id="ip-panel">
  708. <h2><i class="fas fa-crown"></i> IP联名定制</h2>
  709. <p class="section-desc">从热门IP图片中提取颜色,应用到你的羽绒服设计</p>
  710. <div class="ip-upload">
  711. <div class="upload-area" id="uploadArea">
  712. <i class="fas fa-cloud-upload-alt"></i>
  713. <p>点击上传图片或拖放文件到这里</p>
  714. <small>支持JPG、PNG格式,最大5MB</small>
  715. </div>
  716. <button class="btn btn-primary">
  717. <i class="fas fa-magic"></i> 识别图片颜色
  718. </button>
  719. </div>
  720. <h3>热门IP推荐</h3>
  721. <div class="design-gallery">
  722. <div class="design-item">
  723. <div class="design-image">
  724. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="漫威设计">
  725. </div>
  726. <div class="design-info">
  727. <div class="design-title">漫威英雄系列</div>
  728. <div class="design-author">官方授权</div>
  729. </div>
  730. </div>
  731. <div class="design-item">
  732. <div class="design-image">
  733. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="迪士尼设计">
  734. </div>
  735. <div class="design-info">
  736. <div class="design-title">迪士尼公主</div>
  737. <div class="design-author">官方授权</div>
  738. </div>
  739. </div>
  740. <div class="design-item">
  741. <div class="design-image">
  742. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="国潮设计">
  743. </div>
  744. <div class="design-info">
  745. <div class="design-title">国潮故宫联名</div>
  746. <div class="design-author">官方授权</div>
  747. </div>
  748. </div>
  749. <div class="design-item">
  750. <div class="design-image">
  751. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="动漫设计">
  752. </div>
  753. <div class="design-info">
  754. <div class="design-title">热门动漫IP</div>
  755. <div class="design-author">官方授权</div>
  756. </div>
  757. </div>
  758. </div>
  759. </div>
  760. <!-- 设计面板 -->
  761. <div class="panel" id="design-panel">
  762. <h2><i class="fas fa-palette"></i> 个性设计</h2>
  763. <p class="section-desc">选择羽绒服的不同部位并自定义颜色,打造属于你的独特设计</p>
  764. <div class="jacket-display-container">
  765. <div class="jacket-display">
  766. <div class="jacket-base"></div>
  767. <div class="jacket-part jacket-lining" data-part="lining"></div>
  768. <div class="jacket-part jacket-hood active-part" data-part="hood"></div>
  769. <div class="jacket-part jacket-body" data-part="body"></div>
  770. <div class="jacket-part jacket-sleeve left" data-part="sleeve-left"></div>
  771. <div class="jacket-part jacket-sleeve right" data-part="sleeve-right"></div>
  772. </div>
  773. </div>
  774. <h3>选择颜色</h3>
  775. <div class="color-palette">
  776. <div class="color-option active" style="background-color: #3498db;" data-color="#3498db"></div>
  777. <div class="color-option" style="background-color: #e74c3c;" data-color="#e74c3c"></div>
  778. <div class="color-option" style="background-color: #2ecc71;" data-color="#2ecc71"></div>
  779. <div class="color-option" style="background-color: #f1c40f;" data-color="#f1c40f"></div>
  780. <div class="color-option" style="background-color: #9b59b6;" data-color="#9b59b6"></div>
  781. <div class="color-option" style="background-color: #1abc9c;" data-color="#1abc9c"></div>
  782. <div class="color-option" style="background-color: #e67e22;" data-color="#e67e22"></div>
  783. <div class="color-option" style="background-color: #2c3e50;" data-color="#2c3e50"></div>
  784. <div class="color-option" style="background-color: #ecf0f1;" data-color="#ecf0f1"></div>
  785. <div class="color-option" style="background-color: #e84393;" data-color="#e84393"></div>
  786. <div class="color-option" style="background-color: #00cec9;" data-color="#00cec9"></div>
  787. <div class="color-option" style="background-color: #fd79a8;" data-color="#fd79a8"></div>
  788. <div class="color-option" style="background-color: #6c5ce7;" data-color="#6c5ce7"></div>
  789. <div class="color-option" style="background-color: #00b894;" data-color="#00b894"></div>
  790. <div class="color-option" style="background-color: #fdcb6e;" data-color="#fdcb6e"></div>
  791. <div class="color-option" style="background-color: #e17055;" data-color="#e17055"></div>
  792. <div class="color-option" style="background-color: #0984e3;" data-color="#0984e3"></div>
  793. <div class="color-option" style="background-color: #d63031;" data-color="#d63031"></div>
  794. <div class="color-option" style="background-color: #636e72;" data-color="#636e72"></div>
  795. <div class="color-option" style="background-color: #ffeaa7;" data-color="#ffeaa7"></div>
  796. </div>
  797. <div class="action-buttons">
  798. <button class="btn btn-secondary" id="resetBtn">
  799. <i class="fas fa-redo"></i> 重置
  800. </button>
  801. <button class="btn btn-primary pulse" id="saveBtn">
  802. <i class="fas fa-save"></i> 保存设计
  803. </button>
  804. </div>
  805. <h3>我的设计</h3>
  806. <div class="design-gallery">
  807. <div class="design-item">
  808. <div class="design-image">
  809. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="我的设计1">
  810. </div>
  811. <div class="design-info">
  812. <div class="design-title">蓝色风暴</div>
  813. <div class="design-author">刚刚保存</div>
  814. </div>
  815. </div>
  816. <div class="design-item">
  817. <div class="design-image">
  818. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="我的设计2">
  819. </div>
  820. <div class="design-info">
  821. <div class="design-title">红黑经典</div>
  822. <div class="design-author">昨天</div>
  823. </div>
  824. </div>
  825. </div>
  826. </div>
  827. <!-- 我的面板 -->
  828. <div class="panel" id="my-panel">
  829. <h2><i class="fas fa-user"></i> 我的账户</h2>
  830. <p class="section-desc">管理你的设计、收藏和个人信息</p>
  831. <div class="color-stat" style="max-width: 100%; text-align: left; display: flex; align-items: center; gap: 20px;">
  832. <div class="color-box" style="background: linear-gradient(135deg, var(--primary), var(--accent)); width: 80px; height: 80px;">
  833. <i class="fas fa-user" style="font-size: 2rem;"></i>
  834. </div>
  835. <div>
  836. <div class="stat-name">用户昵称</div>
  837. <div class="stat-count">会员等级: 黄金会员</div>
  838. </div>
  839. </div>
  840. <h3>我的设计 (2)</h3>
  841. <div class="design-gallery">
  842. <div class="design-item">
  843. <div class="design-image">
  844. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="我的设计1">
  845. </div>
  846. <div class="design-info">
  847. <div class="design-title">蓝色风暴</div>
  848. <div class="design-author">3天前</div>
  849. </div>
  850. </div>
  851. <div class="design-item">
  852. <div class="design-image">
  853. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="我的设计2">
  854. </div>
  855. <div class="design-info">
  856. <div class="design-title">红黑经典</div>
  857. <div class="design-author">1周前</div>
  858. </div>
  859. </div>
  860. </div>
  861. <h3>我的收藏 (4)</h3>
  862. <div class="design-gallery">
  863. <div class="design-item">
  864. <div class="design-image">
  865. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="收藏设计1">
  866. </div>
  867. <div class="design-info">
  868. <div class="design-title">星空主题</div>
  869. <div class="design-author">by 设计师小王</div>
  870. </div>
  871. </div>
  872. <div class="design-item">
  873. <div class="design-image">
  874. <img src="https://i.ibb.co/0QrZb0C/jacket-base.png" alt="收藏设计2">
  875. </div>
  876. <div class="design-info">
  877. <div class="design-title">火焰纹路</div>
  878. <div class="design-author">by 创意达人</div>
  879. </div>
  880. </div>
  881. </div>
  882. <div class="action-buttons" style="margin-top: 30px;">
  883. <button class="btn btn-secondary">
  884. <i class="fas fa-cog"></i> 设置
  885. </button>
  886. <button class="btn btn-primary">
  887. <i class="fas fa-sign-out-alt"></i> 退出登录
  888. </button>
  889. </div>
  890. </div>
  891. <footer>
  892. <p>© 2023 羽绒服DIY - 创造你的个性时尚</p>
  893. <p>让每个人都能成为设计师</p>
  894. </footer>
  895. </div>
  896. <!-- 底部导航 -->
  897. <div class="bottom-nav">
  898. <div class="nav-item active" data-tab="home">
  899. <i class="fas fa-home"></i>
  900. <span>首页</span>
  901. </div>
  902. <div class="nav-item" data-tab="ip">
  903. <i class="fas fa-crown"></i>
  904. <span>IP定制</span>
  905. </div>
  906. <div class="nav-item" data-tab="design">
  907. <i class="fas fa-palette"></i>
  908. <span>设计</span>
  909. </div>
  910. <div class="nav-item" data-tab="my">
  911. <i class="fas fa-user"></i>
  912. <span>我的</span>
  913. </div>
  914. </div>
  915. <script>
  916. // 页面加载完成后执行
  917. document.addEventListener('DOMContentLoaded', function() {
  918. // 标签切换功能
  919. function switchTab(tabName) {
  920. // 移除所有活动标签
  921. document.querySelectorAll('.tab, .nav-item').forEach(t => t.classList.remove('active'));
  922. // 添加当前活动标签
  923. document.querySelectorAll(`[data-tab="${tabName}"]`).forEach(t => t.classList.add('active'));
  924. // 隐藏所有面板
  925. document.querySelectorAll('.panel').forEach(panel => panel.classList.remove('active'));
  926. // 显示对应面板
  927. document.getElementById(`${tabName}-panel`).classList.add('active');
  928. }
  929. document.querySelectorAll('.tab, .nav-item').forEach(tab => {
  930. tab.addEventListener('click', () => {
  931. const tabName = tab.getAttribute('data-tab');
  932. switchTab(tabName);
  933. });
  934. });
  935. // 部位选择功能
  936. document.querySelectorAll('.jacket-part').forEach(part => {
  937. part.addEventListener('click', () => {
  938. document.querySelectorAll('.jacket-part').forEach(p => p.classList.remove('active-part'));
  939. part.classList.add('active-part');
  940. });
  941. });
  942. // 颜色选择功能
  943. document.querySelectorAll('.color-option').forEach(color => {
  944. color.addEventListener('click', () => {
  945. const selectedColor = color.getAttribute('data-color');
  946. const activePart = document.querySelector('.jacket-part.active-part');
  947. if (activePart) {
  948. activePart.style.background = `linear-gradient(135deg, ${selectedColor}, ${adjustColor(selectedColor, -20)})`;
  949. }
  950. // 更新活动颜色指示器
  951. document.querySelectorAll('.color-option').forEach(c => c.classList.remove('active'));
  952. color.classList.add('active');
  953. });
  954. });
  955. // 辅助函数:调整颜色亮度
  956. function adjustColor(color, amount) {
  957. return '#' + color.replace(/^#/, '').replace(/../g, color => ('0'+Math.min(255, Math.max(0, parseInt(color, 16) + amount)).toString(16)).substr(-2));
  958. }
  959. // 复制链接功能
  960. document.getElementById('copyBtn')?.addEventListener('click', () => {
  961. const linkInput = document.getElementById('shareLink');
  962. if (linkInput) {
  963. linkInput.select();
  964. document.execCommand('copy');
  965. // 显示复制成功提示
  966. const btnText = document.getElementById('copyBtn');
  967. btnText.innerHTML = '<i class="fas fa-check"></i> 已复制';
  968. setTimeout(() => {
  969. btnText.innerHTML = '<i class="fas fa-copy"></i> 复制链接';
  970. }, 2000);
  971. }
  972. });
  973. // 上传区域交互
  974. const uploadArea = document.getElementById('uploadArea');
  975. if (uploadArea) {
  976. uploadArea.addEventListener('dragover', (e) => {
  977. e.preventDefault();
  978. uploadArea.style.borderColor = 'var(--primary)';
  979. uploadArea.style.backgroundColor = 'rgba(52, 152, 219, 0.1)';
  980. });
  981. uploadArea.addEventListener('dragleave', () => {
  982. uploadArea.style.borderColor = 'var(--light-gray)';
  983. uploadArea.style.backgroundColor = 'var(--lighter)';
  984. });
  985. uploadArea.addEventListener('click', () => {
  986. alert('图片上传功能需要后端支持,此处为前端演示');
  987. });
  988. }
  989. // 重置按钮功能
  990. document.getElementById('resetBtn')?.addEventListener('click', () => {
  991. document.querySelectorAll('.jacket-part').forEach(part => {
  992. part.style.background = '';
  993. });
  994. // 重置颜色选择器
  995. document.querySelectorAll('.color-option').forEach(color => {
  996. color.classList.remove('active');
  997. });
  998. // 设置默认颜色为选中
  999. document.querySelector('.color-option').classList.add('active');
  1000. // 设置默认激活部位
  1001. document.querySelectorAll('.jacket-part').forEach(p => p.classList.remove('active-part'));
  1002. document.querySelector('.jacket-hood').classList.add('active-part');
  1003. });
  1004. // 保存按钮功能
  1005. document.getElementById('saveBtn')?.addEventListener('click', () => {
  1006. alert('设计已保存!您可以在"我的"页面查看保存的设计。');
  1007. switchTab('my');
  1008. });
  1009. // 初始化图表
  1010. const ctx = document.getElementById('colorChart')?.getContext('2d');
  1011. if (ctx) {
  1012. new Chart(ctx, {
  1013. type: 'bar',
  1014. data: {
  1015. labels: ['海洋蓝', '活力红', '森林绿', '阳光黄', '梦幻紫', '珊瑚橙'],
  1016. datasets: [{
  1017. label: '使用次数',
  1018. data: [1850, 1620, 1540, 1420, 1360, 1280],
  1019. backgroundColor: [
  1020. '#3498db',
  1021. '#e74c3c',
  1022. '#2ecc71',
  1023. '#f1c40f',
  1024. '#9b59b6',
  1025. '#ff7f50'
  1026. ],
  1027. borderColor: [
  1028. '#2980b9',
  1029. '#c0392b',
  1030. '#27ae60',
  1031. '#f39c12',
  1032. '#8e44ad',
  1033. '#ff6347'
  1034. ],
  1035. borderWidth: 1,
  1036. borderRadius: 10
  1037. }]
  1038. },
  1039. options: {
  1040. responsive: true,
  1041. maintainAspectRatio: false,
  1042. plugins: {
  1043. legend: {
  1044. display: false
  1045. },
  1046. title: {
  1047. display: true,
  1048. text: '颜色使用频率统计',
  1049. font: {
  1050. size: 16
  1051. }
  1052. }
  1053. },
  1054. scales: {
  1055. y: {
  1056. beginAtZero: true,
  1057. grid: {
  1058. color: 'rgba(0, 0, 0, 0.05)'
  1059. }
  1060. },
  1061. x: {
  1062. grid: {
  1063. display: false
  1064. }
  1065. }
  1066. }
  1067. }
  1068. });
  1069. }
  1070. });
  1071. </script>
  1072. </body>
  1073. </html>