LuminousCard

多色径向渐变 + 多层 inset box-shadow 模拟玻璃质感与立体光照的容器。默认启用 CSS Borders Level 4 的 corner-shape: squircle 实现苹果平滑圆角,在不支持的浏览器(Safari / Firefox / 旧 Chrome)会自动降级为普通 border-radius。

原始 demo 复刻

Activity 卡 + Bottom Panel

Last test
i
Liter
0.24CO2
Empty your lungs
1.13O
Finish Test

Hover 效果

启用 hover prop · 主光源渐变增亮(鼠标移上去查看)

Pink · Top

hover · glow

Cyan · Top

hover · glow

Emerald · Bottom

hover · glow

hover · off

默认状态 · 无 hover 反馈

hover · on

主光源渐变 alpha × 1.7 · 500ms ease-out 渐入

Corner Shape · 苹果平滑圆角

CSS Borders Level 4 — squircle 与其他角型对比(不支持浏览器降级为 round)

Round

border-radius: 48px

传统圆角 · 跨浏览器一致

Squircle

corner-shape: squircle

Chromium 139+ · Safari / Firefox 当前自动降级为 round

round
squircle
bevel
scoop
notch

Tone 预设

8 种色调 × top / bottom

pinkorigin · top
blueorigin · top
purpleorigin · top
amberorigin · top
emeraldorigin · top
cyanorigin · top
roseorigin · top
limeorigin · top
pinkorigin · bottom
blueorigin · bottom
purpleorigin · bottom
amberorigin · bottom
emeraldorigin · bottom
cyanorigin · bottom
roseorigin · bottom
limeorigin · bottom

Origin 对比

同 tone 的顶部光源 vs 底部光源

Top Origin

光源在顶部 · 顶部柔光 + 底部硬边

Bottom Origin

光源在底部 · 顶部暗压 + 底部柔光

Radius 渐变

从规整方角到 Apple Squircle

16px
28px
40px
56px

自由调试

实时改 tone / origin / radius / cornerShape / 主光源色

Live Preview

tone=pink · origin=top · radius=48px

cornerShape=squircle

hover=false

开启后悬停 Live Preview · 主光源渐变增亮

48px

n=2 等价 squircle · n=1 菱形 · n→∞ 趋近方形 · 不支持浏览器自动降级