返回 oh-my-ppt
preview.html
根目录 / resources / styles / soft-pastel / preview.html
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>柔和马卡龙 · soft-pastel</title>
7 <style>
8 * { box-sizing: border-box; margin: 0; padding: 0; }
9 html, body {
10 width: 100%; height: 100%; overflow: hidden;
11 background: #0f1117;
12 display: flex; align-items: center; justify-content: center;
13 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
14 }
15 .slide {
16 width: min(100vw, calc(100vh * 16 / 9));
17 aspect-ratio: 16 / 9;
18 background: #fef3c7;
19 position: relative;
20 overflow: hidden;
21 }
22 .blob {
23 position: absolute;
24 border-radius: 50%;
25 filter: blur(0px);
26 opacity: 0.5;
27 }
28 .blob-1 {
29 width: 55%; height: 80%;
30 background: radial-gradient(circle, #f472b6 0%, #f9a8d4 60%, transparent 70%);
31 top: -25%; left: -15%;
32 border-radius: 40% 60% 50% 50%;
33 }
34 .blob-2 {
35 width: 45%; height: 65%;
36 background: radial-gradient(circle, #60a5fa 0%, #93c5fd 60%, transparent 70%);
37 bottom: -20%; right: -10%;
38 border-radius: 50% 50% 45% 55%;
39 }
40 .blob-3 {
41 width: 30%; height: 40%;
42 background: radial-gradient(circle, #fbbf24 0%, #fcd34d 60%, transparent 70%);
43 top: 10%; right: 25%;
44 border-radius: 55% 45% 50% 50%;
45 opacity: 0.35;
46 }
47 .blob-4 {
48 width: 20%; height: 25%;
49 background: radial-gradient(circle, #f472b6 0%, transparent 70%);
50 bottom: 15%; left: 30%;
51 border-radius: 50%;
52 opacity: 0.3;
53 }
54 .content {
55 position: absolute;
56 inset: 0;
57 display: flex;
58 flex-direction: column;
59 align-items: center;
60 justify-content: center;
61 text-align: center;
62 z-index: 2;
63 }
64 .category {
65 font-size: clamp(7px, 0.75vw, 10px);
66 color: #9d174d;
67 letter-spacing: 0.3em;
68 text-transform: uppercase;
69 font-weight: 600;
70 background: rgba(255,255,255,0.5);
71 padding: 4px 16px;
72 border-radius: 50px;
73 margin-bottom: 3%;
74 }
75 h1 {
76 font-size: clamp(34px, 6vw, 72px);
77 font-weight: 700;
78 color: #831843;
79 line-height: 1.15;
80 }
81 .desc {
82 font-size: clamp(10px, 1.2vw, 15px);
83 color: #9d174d;
84 line-height: 1.7;
85 margin-top: 2%;
86 max-width: 50%;
87 font-weight: 400;
88 opacity: 0.8;
89 }
90 .tags {
91 display: flex;
92 gap: 10px;
93 margin-top: 4%;
94 flex-wrap: wrap;
95 justify-content: center;
96 }
97 .tags span {
98 font-size: clamp(7px, 0.7vw, 10px);
99 color: #831843;
100 background: rgba(255,255,255,0.55);
101 padding: 5px 14px;
102 border-radius: 50px;
103 font-weight: 500;
104 }
105 .palette {
106 position: absolute;
107 bottom: 7%;
108 left: 50%;
109 transform: translateX(-50%);
110 display: flex;
111 gap: 10px;
112 z-index: 2;
113 }
114 .palette i {
115 display: block;
116 width: clamp(14px, 1.6vw, 22px);
117 height: clamp(14px, 1.6vw, 22px);
118 border-radius: 50%;
119 background: var(--c);
120 box-shadow: 0 4px 12px rgba(0,0,0,0.1);
121 }
122 .label {
123 position: absolute;
124 bottom: 3%;
125 right: 5%;
126 font-size: clamp(6px, 0.65vw, 8px);
127 color: #d97706;
128 opacity: 0.4;
129 letter-spacing: 0.1em;
130 }
131 @media (max-aspect-ratio: 16/9) {
132 .slide { width: min(100vw, calc(100vh * 16 / 9)); height: auto; }
133 }
134 @media (min-aspect-ratio: 16/9) {
135 .slide { height: min(100vh, calc(100vw * 9 / 16)); width: auto; }
136 }
137 </style>
138 </head>
139 <body>
140 <main class="slide" aria-label="柔和马卡龙 style preview">
141 <div class="blob blob-1"></div>
142 <div class="blob blob-2"></div>
143 <div class="blob blob-3"></div>
144 <div class="blob blob-4"></div>
145 <section class="content">
146 <div class="category">浅色 · 沉静</div>
147 <h1>柔和马卡龙</h1>
148 <p class="desc">马卡龙三色在画布上轻轻晕开,柔软得像一声早安</p>
149 <div class="tags">
150 <span>产品发布</span>
151 <span>消费者展示</span>
152 <span>轻松话题</span>
153 <span>亲子教育</span>
154 </div>
155 </section>
156 <div class="palette">
157 <i style="--c:#831843"></i>
158 <i style="--c:#9d174d"></i>
159 <i style="--c:#f472b6"></i>
160 <i style="--c:#60a5fa"></i>
161 <i style="--c:#fef3c7"></i>
162 </div>
163 <div class="label">soft-pastel</div>
164 </main>
165 </body>
166 </html>
166 lines HTML