黏土拟态
Claymorphism
柔软圆角、带颜色的高光和内阴影,让形状像捏出的立体黏土。
适用场景
给活泼的徽章、图标或引导插画增加体积感。 用带颜色的高光和宽阴影塑造圆润的大轮廓,缩小显示时也能看出体积。
应用示例
儿童阅读应用用一本薄荷绿色的黏土书庆祝读完第一篇故事。明亮的内侧上沿和较深的底部让小书像手捏出来的,完成说明放在旁边的干净区域。
AI 提示词
给【目标卡片】做黏土拟态。采用圆润轮廓和彩色表面,叠加顶部内高光、底部较宽的内阴影和柔和投影。确保上层文字仍然清楚。
示例代码
保存为 HTML 文件后,用浏览器打开即可运行。代码与页面里的演示一致。
查看 HTML
<!doctype html>
<html lang="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>黏土拟态</title>
<style>
:root {
color-scheme: dark;
--demo-bg: #171629;
--demo-ink: #f8f5ff;
--demo-accent: #b9a6ff;
--demo-muted: #bfbbd3;
font-family: system-ui, sans-serif;
color: var(--demo-ink);
background: var(--demo-bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, input { font: inherit; }
.demo {
display: grid;
place-items: center;
align-content: center;
min-height: 100vh;
padding: 14px;
overflow: hidden;
background: radial-gradient(ellipse at 50% 24%, #28233f, var(--demo-bg) 78%);
}
.demo-button {
border: 1px solid #ffffff3d;
border-radius: 7px;
background: #ffffff12;
color: var(--demo-ink);
padding: 6px 11px;
font-size: 12px;
cursor: pointer;
}
:focus-visible {
outline: 2px solid var(--demo-accent);
outline-offset: 3px;
}
.visual-specimen {
width: min(100%, 290px);
height: 124px;
display: grid;
place-items: center;
position: relative;
isolation: isolate;
}
.clay-shape {
display: flex; justify-content: center; align-items: center; gap: 10px;
width: 119px; height: 76px; transform: rotate(-7deg);
border-radius: 26px 31px 23px 27px; background: #f5a291;
box-shadow: inset 5px 5px 13px #ffe2c9, inset -9px -11px 16px #bb547c, 3px 15px 22px -5px #a7496f81;
}
.clay-shape i { width: 12px; height: 14px; border-radius: 50%; background: #a35572; box-shadow: inset -2px -2px 2px #e1848e; }
</style>
</head>
<body>
<main class="demo">
<div class="visual-specimen" aria-hidden="true"><div class="clay-shape"><i></i><i></i></div></div>
</main>
</body>
</html>UI Skills 原创示例