Hover Fan-Out (Folder Peek) new 悬停扇形展开 web
Hovering a folder fans its cards out in an arc above it, and the card under the pointer lifts forward
鼠标移到文件夹上,卡片在上方扇形展开;指到哪张,哪张就抬起来
Hover the folder to fan the cards out; the card under the pointer lifts.
标本可交互,可以直接操作。
Anatomy — every part, named解剖 —— 每个部件的名字
-
1 Closed stack收起的卡片堆
transformCards rest inside the folder, slightly offset.
卡片放在文件夹里,略微错开。
Prompt fragmentPrompt 片段five cards stacked inside the folder with small offsets
五张卡片叠在文件夹里,略有错位
-
2 Fan扇形
rotate + translateOn hover the cards spread on an arc around a pivot below.
悬停时卡片绕下方支点沿弧线散开。
Prompt fragmentPrompt 片段cards rotating about ±13° per step around a pivot below the folder
卡片绕文件夹下方支点,每张约 ±13° 旋转
-
3 Lift抬起
translateY + scaleThe card under the pointer rises and comes to the front.
鼠标下的卡片升起并移到最前。
Prompt fragmentPrompt 片段the hovered card lifting 18px and scaling to 1.08 on top
悬停的卡片上抬 18px、放大到 1.08 并置顶
-
4 Pocket前袋
rotateXThe front pocket tilts open slightly as the cards rise.
卡片升起时前袋略微向后打开。
Prompt fragmentPrompt 片段the front pocket tilting back a little when open
展开时前袋轻微后倾
Prompt — paste into your agentPrompt —— 直接粘贴给你的代理
Build a hover fan-out folder: a folder with a back panel, a front pocket and five cards stacked inside. On hover or focus, fan the cards out around a pivot below the folder (rotate about ±13° per step, spread ±30px, raise them above the pocket) and tilt the pocket slightly; the card under the pointer lifts a further 18px and scales to 1.08 while staying on top. Close on leave or blur. Use a springy cubic-bezier, support arrow keys to move the lift, and skip motion under prefers-reduced-motion.
做一个悬停扇形展开的文件夹:文件夹有后板、前袋和放在里面的五张卡片。悬停或获得焦点时,卡片绕文件夹下方的支点扇形展开(每张约 ±13° 旋转、±30px 横移,并升到前袋上方),前袋略微后倾;鼠标指着的那张再上抬 18px、放大到 1.08 并保持在最上层。离开或失焦时收回。用带回弹的 cubic-bezier,支持方向键切换抬起的卡片,prefers-reduced-motion 时不做动画。
Debug prompt — when it misbehaves调试 Prompt —— 当它不听话时
Debug my hover fan-out. Check that cards share one transform-origin below the stack so they fan rather than slide; hover on the folder and hover on a card do not fight (moving from folder to card must not close it); the lifted card's z-index wins; the fan does not overflow its container; keyboard focus opens it and arrow keys move the lift; touch has a tap-to-open alternative; and reduced motion shows the open state without animation. The symptom:
调试我的悬停扇形展开。检查:卡片是否共用卡片下方的同一个 transform-origin,所以是扇形散开而不是平移;文件夹的悬停和卡片的悬停是否互相打架(从文件夹移到卡片上不能收起);抬起的卡片层级是否最高;扇形是否超出容器;键盘聚焦能否展开,方向键能否切换;触屏是否有点按展开的替代方式;以及减少动态效果时是否直接显示展开状态。症状是:
In code代码里叫什么
| Framework框架 | Symbol符号 | Note说明 |
|---|---|---|
| CSS | :hover + transform: rotate() translate() | spread each card around a shared pivot below the folder让每张卡片绕文件夹下方的同一个支点散开 |
| CSS | transform-origin | a pivot below the cards makes the spread read as a fan支点放在卡片下方,散开才像扇形 |
| CSS | transition with an overshoot curve | cubic-bezier with a slight overshoot for a springy open带一点回弹的缓动曲线 |
| Motion | variants + staggerChildren | a React route to stagger the cards as they openReact 中让卡片依次展开的做法 |