性能
通过帧率: 平均 60 fps,p5 59.5 · 长任务: 0 个,共 0 毫秒,最长 0 毫秒 · 源码 gzip 1.6 KB · 运行时 2.9 KB
evil-lion-15MIT开关Uiverse.io
vikramsinghnegi 用纯 HTML 和 CSS 做的开关。按 MIT 许可从 Uiverse.io 收录,此处为实时预览。
质量报告
等级和分数来自构建或测试时跑过的自动检查。没跑过的项目会标成「未检测」,不会填假数据。
帧率: 平均 60 fps,p5 59.5 · 长任务: 0 个,共 0 毫秒,最长 0 毫秒 · 源码 gzip 1.6 KB · 运行时 2.9 KB
问题 0 · 读屏: 通过
没有持续动效
无溢出
帧率和长任务是在无界面的 Chromium 里用软件 WebGL 测的,只适合在本站组件之间比较,不代表真机表现。
不适用:静止时没有可见动画;由悬停触发的动画没有测试。
没有 axe-core 违规。

检测于 2026年11月15日 · 数据来自自动脚本,不是手工填写。
按实际尺寸显示。
复制内容以许可声明开头,使用代码时请保留。
<div>
<div class="switch">
<input type="checkbox" id="switch1" class="switch-check" />
<label for="switch1" class="switch-label">
Check
<span></span>
</label>
</div>
</div>/* From Uiverse.io by vikramsinghnegi - Tags: simple, neumorphism, glassmorphism */
.switch {
background-color: rgba(0, 0, 0, 0.2);
border-radius: 50px;
border: 4px solid rgba(209, 92, 92, 0.1);
box-shadow: 8 0 6px rgba(44, 26, 26, 0.5) inset;
height: 42px;
margin: 8px;
position: relative;
width: 115px;
display: inline-block;
}
.switch-check {
position: absolute;
visibility: hidden;
}
.switch-label {
cursor: pointer;
display: block;
height: 42px;
text-indent: -9999px;
width: 115px;
}
.switch-label:before {
background: #fff;
background: -webkit-radial-gradient(
45%,
circle,
rgb(116, 78, 78) 0%,
rgb(255, 113, 113) 100%
);
border-radius: 10px;
border: 1px solid #742323;
box-shadow: 0 2px 5px rgba(255, 67, 48, 0.6),
0 0 5px rgba(255, 159, 109, 0.5) inset;
content: "";
display: block;
height: 10px;
left: -20%;
position: absolute;
top: 16px;
transition: all 0.2s;
width: 10px;
z-index: 12;
}
.switch-label:after {
background: #fff;
background: -moz-radial-gradient(
45%,
circle,
rgba(60, 60, 60, 0.6) 0%,
rgba(151, 151, 151, 0.6) 100%
);
border-radius: 10px;
border: 1px solid #111;
box-shadow: 0 2px 5px rgba(20, 20, 20, 0.5);
content: "";
display: block;
height: 10px;
right: -20%;
position: absolute;
top: 16px;
transition: all 0.2s;
width: 10px;
z-index: 12;
}
.switch-label span {
background: linear-gradient(#4f4f4f, #2b2b2b);
border-radius: 30px;
border: 1px solid #1a1a1a;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.5),
0 1px 1px rgba(255, 255, 255, 0.1) inset, 0 -2px 0 rgba(0, 0, 0, 0.2) inset;
display: block;
height: 38px;
left: 1px;
position: absolute;
top: 1px;
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
transition: all 0.2s linear;
width: 53px;
}
.switch-label span:before {
background: #fff;
background: -webkit-linear-gradient(
left,
rgba(48, 48, 48, 0.4),
rgba(34, 34, 34, 0.4)
);
background: linear-gradient(
left,
rgba(48, 48, 48, 0.4),
rgba(34, 34, 34, 0.4)
);
border-radius: 30px 10px 10px 30px;
box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2) inset;
content: "";
display: block;
height: 33px;
left: 2px;
position: absolute;
top: 2px;
width: 21px;
}
.switch-label span:after {
background: #fff;
background: -webkit-linear-gradient(
right,
rgba(48, 48, 48, 0.4),
rgba(34, 34, 34, 0.4)
);
border-radius: 10px 30px 30px 10px;
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2) inset;
content: "";
display: block;
height: 33px;
position: absolute;
right: 2px;
top: 2px;
width: 21px;
}
.switch-check:checked + .switch-label span {
left: 59px;
}控件 · HTML · CSS · JS
直接改代码,再用控件微调,预览会随输入实时更新。

在线编辑每个组件,用控件微调,下载完整源码,复制进阶提示词。
一次性 $49占位价格
测试模式:不会真实扣款。
免费:预览、复制按钮和课程说明。
深色凹槽里是一颗带暖光的红色径向渐变旋钮,像控制台上的硬件开关。
复古或游戏风设置,以及直播、录制开关。
改 115px × 42px 尺寸、rgb(255,113,113) 径向渐变和橙色光晕阴影。
用纯 HTML、CSS 和 JavaScript(不用框架)做一个「红色光泽胶囊开关」组件。深色凹槽里是一颗带暖光的红色径向渐变旋钮,像控制台上的硬件开关。 适用场景:复古或游戏风设置,以及直播、录制开关。 开放这些可调项:改 115px × 42px 尺寸、rgb(255,113,113) 径向渐变和橙色光晕阴影。 支持浅色和深色主题,遵守 prefers-reduced-motion 并给出静止画面,保证文字清晰、控件可用键盘操作。请写原创代码,不要从付费或受限的组件库复制。
更完整的提示词,包含调参、无障碍和接入步骤。