✨ 会倾斜、能翻转的 3D 镭射卡片——《999 个小技巧,让你 Vibe 的产品更有质感》018 今天分享六种镭射卡片的材质预设:Prism、Rainbow、Pearl、Sparkle、Chrome 和 Etched,适用于门票、分享卡片、购买凭据等场景。 另附一条 Prompt,可将你产品中的卡片改造为同类效果,直接复制即可 ⬇️ 实现这类效果,有以下几个要点: 1. 倾斜:卡片随指针方向倾斜,最大角度为 12°,指针离开时轻微回弹;无人操作时,卡片保持轻微晃动。 2. 镭射层:叠加在卡片底色之上,越靠近光点,亮度越高。 3. 高光与亮边:高光以光点为中心向外扩散;亮边仅在靠近光点的一段被照亮,若隐若现。 4. 视差层次:窗口内的元素分布在不同深度,卡片转动时各层相对错开,呈现真实的三维空间感。 5. 厚度:点击卡片可翻转至背面,翻转时卡片略微抬起,露出 10px 的厚度。
枯白啃设计

图标设计师 / 设计工程师

Prompt(3/5) second: repeating-linear-gradient(-35deg, rgb(169 139 255) 0 3%, transparent 5% 9%, rgb(139 255 196) 11% 14%, transparent 16% 20%, rgb(255 255 255) 22% 24%, transparent 26% 30%), size 260%, position (100% - lx, ly * 1.4). The dark gaps make each fleck light at its own angle and go out again. - Edge rgb(26 32 72). Glow hue 235. - Chrome: a silver mirror whose highlights travel against the tilt. - Base: linear-gradient(125deg, rgb(228 230 234) 0%, rgb(141 147 158) 16%, rgb(246 247 249) 30%, rgb(124 130 141) 46%, rgb(217 220 225) 60%, rgb(148 154 165) 76%, rgb(241 242 244) 100%), background-size 220%, background-position (100% - lx, 100% - ly). Ink rgb(27 29 36). - Foil: linear-gradient(115deg, rgb(255 143 199), rgb(255 226 143) 14%, rgb(149 255 208) 28%, rgb(143 214 255) 42%, rgb(192 155 255) 56%, then again), size 240%, position at the light, overlay, opacity 0.3 + on * 0.35. - Glare: soft-light, white at 85%, 10% at 30%, black at 18% at 95%. Rim: base white at 18%, light white at 95%. An engraved look for printed lines: text-shadow 0 -1px 0 rgb(60 64 76 / 0.55), 0 1px 0 rgb(255 255 255 / 0.95). - Edge rgb(180 184 194). Glow hue 200. - Etched: a pattern you only see in the light. - Base: matte rgb(18 18 20) with fine concentric rings, repeating-radial-gradient(circle at the artwork's center, rgb(255 255 255 / 0.05) 0 1.2px, transparent 1.6px 7px). Ink rgb(237 237 238). - Foil: linear-gradient(115deg, rgb(255 95 126), rgb(255 184 107) 10%, rgb(244 255 107) 20%, rgb(107 255 181) 30%, rgb(95 210 255) 40%, rgb(139 123 255) 50%, then again), size 300%, position at the light, masked by the same rings and by radial-gradient(at the light, rgb(0 0 0), rgb(0 0 0 / 0.5) 18%, transparent 42%); opacity 0.25 + on * 0.75. Glare opacity 0.2 + on * 0.4. - Keep the artwork window a plain matte panel (radial-gradient(70% 60% at 50% 35%, rgb(29 29 33), rgb(15 15 17))) so the rings stop at it. - Edge rgb(27 27 30). Glow hue 190. - On every finish, the rim's base color is white at 5% unless listed, and its light color white at 50%. Text stays readable at every angle: check the lightest and darkest moment of the foil under it. 4. Turning over (only if chosen; Standard values) - A click (or tap, or Enter and Space when focused) turns the card 180deg around its vertical axis on a spring (stiffness 70, damping 11), so it settles with a small overshoot in about 0.8s; the same again turns it back. - It lifts toward the viewer while it turns: translateZ(|sin(angle)| * 40px); the shadow narrows by up to 45% and drops 14px at edge-on. - Thickness 10px: the front sits 5px in front of the card's middle and the back 5px behind it, turned 180deg, both with backface-visibility hidden; between them, 10 copies of the card's outline in the finish's edge color, evenly spaced. Draw the edge only while turning. - The back carries the same finish, glare and rim, with the light mirrored (lx becomes 100% - lx). Lay it out on the same margins as the front. - Anything that changes the front (another finish, new content) changes while the card is edge-on, so it is never seen switching. 5. Depth inside the artwork (Standard values) - Give each part of the artwork its own depth d behind the card's face (negative: in front of it), and move it by d * sin(angle): x = -d * sin(rotateY + turn), y = d * sin(rotateX). This is what real 3D would do. - In the demo: the picture behind it 90px, the compass dial 50px, its middle ring 34px, the dashed ring 20px, the needle 12px in front (-12); the print in the corners sits on the surface and does not move. Draw the backmost layer larger than its window (100px on each side) so its edges never show. - If the artwork can respond, let it: the compass needle springs toward the pointer (acceleration = 60 * angle difference - 5.5 * velocity, the short way round) and drifts by 12deg * sin(0.77t) + 6deg * sin(2.16t) when left alone; the dial turns 9deg a second and the dashed ring 18deg a second the other way. Small, slow, and one moving idea. 6. Rhythm and accessibility - Hover in and out, tilt and light are continuous; the flip settles in about 0.8s. - Switching finishes: cross-fade the faces over 420ms, or swap them while edge-on during a flip.
登录并发表评论

评论 · 0