js+css实现图片色盘故事卡片生成器代码

代码语言:html

所属分类:其他

代码由glm-5.2 ai生成,可能有错误,仅供参考:点击查看提示词

代码描述:图片色盘故事卡片生成器

代码标签: js css 图片 色盘 故事 卡片 生成器 代码

下面为部分代码预览,完整代码请点击下载或在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>Chroma Memory · 色彩记忆卡片</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,500;0,9..144,700;0,9..144,900;1,9..144,400;1,9..144,500;1,9..144,700&family=DM+Sans:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
<style>
:root {
  --bg: #13110d;
  --bg-2: #1c1812;
  --card: #221c14;
  --card-2: #2a2218;
  --border: #3a3024;
  --border-2: #4a3d2d;
  --fg: #f5ebe0;
  --muted: #a89683;
  --dim: #6b5d4a;
  --accent: #e8743c;
  --accent-2: #f4a261;
  --warm: #d4a373;
  --cream: #f5ebe0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.serif { font-family: 'Fraunces', serif; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* 背景装饰 */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: 
    radial-gradient(ellipse 60% 50% at 15% 15%, rgba(232,116,60,0.15), transparent 60%),
    radial-gradient(ellipse 50% 60% at 85% 85%, rgba(212,163,115,0.10), transparent 60%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(244,162,97,0.06), transparent 70%);
}

.bg-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
}

.floating-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: float 22s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(60px, -40px) scale(1.15); }
  66% { transform: translate(-40px, 50px) scale(0.9); }
}

.app {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--accent), var(--warm));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 900;
  color: var(--bg);
  font-style: italic;
  box-shadow: 0 8px 20px -6px rgba(232,116,60,0.5);
}

.brand-text h1 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-text p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

nav {
  display: flex;
  gap: 32px;
  font-size: 13px;
  color: var(--muted);
  align-items: center;
}

nav a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.05em;
}

nav a:hover { color: var(--accent-2); }

.nav-cta {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all 0.2s;
}

.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent-2);
  background: rgba(232,116,60,0.05);
}

/* Main */
main {
  flex: 1;
  padding: 30px 48px 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 50px 20px 30px;
  position: relative;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px;
  color: var(--accent-2);
  margin-bottom: 28px;
  background: rgba(232,116,60,0.06);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(42px, 7vw, 96px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero h2 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent-2);
}

.hero h2 .line {
  display: block;
}

.hero p {
  font-size: 16px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

/* Upload area */
.upload-area {
  max-width: 760px;
  margin: 0 auto;
  border: 2px dashed var(--border-2);
  border-radius: 24px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(34, 28, 20, 0.4);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.upload-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(232,116,60,0.08), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.upload-area:hover, .upload-.........完整代码请登录后点击上方下载按钮下载查看

网友评论0