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

检测于 2026年11月15日 · 数据来自自动脚本,不是手工填写。
按实际尺寸显示。
复制内容以许可声明开头,使用代码时请保留。
<label class="switch">
<input type="checkbox" />
<span class="slider">
<span class="yolk"> </span>
<span class="back"> </span>
</span>
</label>/* From Uiverse.io by Na3ar-17 - Tags: simple, animation, action, switch, dark, modern, click, toggle switch */
/* The switch - the box around the slider */
.switch {
font-size: 17px;
position: relative;
display: inline-block;
width: 95px;
height: 50px;
background-color: #2a2a2a;
border-radius: 30px;
cursor: pointer;
}
/* Hide default HTML checkbox */
.switch input {
opacity: 0;
width: 0;
height: 0;
}
/* The slider */
.slider {
position: absolute;
top: 50%;
left: 26%;
transform: translate(-50%, -50%);
height: 40px;
width: 40px;
border-radius: 50%;
background-color: white;
transition: 0.3s cubic-bezier(0.68, -0.25, 0.265, 1.1);
overflow: hidden;
}
.slider .yolk {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 25px;
aspect-ratio: 1/1;
background-color: #f2a828;
border-radius: 50%;
-webkit-box-shadow: inset -2px -2px 43px -35px rgba(255, 255, 255, 1);
-moz-box-shadow: inset -2px -2px 43px -35px rgba(255, 255, 255, 1);
box-shadow: inset -2px -2px 43px -35px rgba(255, 255, 255, 1);
}
.slider .yolk::before {
content: "";
position: absolute;
top: 50%;
left: -22px;
transform: translate(-50%, -50%);
width: 30px;
height: 30px;
background-color: #cabea8;
border-radius: 50%;
}
.slider .yolk::after {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(45deg);
width: 16px;
height: 16px;
background-color: transparent;
border-left: 6px solid #fff;
clip-path: circle(50% at 50% 50%);
}
.slider .back {
position: absolute;
top: 50%;
left: -50%;
transform: translate(-50%, -50%);
height: 40px;
width: 40px;
border-radius: 50%;
background-color: #cabea8;
transition: 0.3s cubic-bezier(0, 0, 0.265, 1.1);
overflow: hidden;
}
.slider .back::before {
content: "";
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 25px;
aspect-ratio: 1/1;
background-color: #eec076;
border-radius: 50%;
}
.switch input:checked + .slider {
left: 74%;
}
.switch input:checked + .slider .back {
left: 50%;
}控件 · HTML · CSS · JS
直接改代码,再用控件微调,预览会随输入实时更新。

在线编辑每个组件,用控件微调,下载完整源码,复制进阶提示词。
一次性 $49占位价格
测试模式:不会真实扣款。
免费:预览、复制按钮和课程说明。
白色旋钮里有一颗黄色蛋黄,带着一点弹性过冲滑过深色轨道,普通开关也能让人会心一笑。
美食和菜谱应用、俏皮的设置和早晨习惯类产品。
改 #2a2a2a 轨道、95px × 50px 尺寸、40px 的蛋和 cubic-bezier(0.68,-0.25,0.265,1.1)。
用纯 HTML、CSS 和 JavaScript(不用框架)做一个「煎蛋开关」组件。白色旋钮里有一颗黄色蛋黄,带着一点弹性过冲滑过深色轨道,普通开关也能让人会心一笑。 适用场景:美食和菜谱应用、俏皮的设置和早晨习惯类产品。 开放这些可调项:改 #2a2a2a 轨道、95px × 50px 尺寸、40px 的蛋和 cubic-bezier(0.68,-0.25,0.265,1.1)。 支持浅色和深色主题,遵守 prefers-reduced-motion 并给出静止画面,保证文字清晰、控件可用键盘操作。请写原创代码,不要从付费或受限的组件库复制。
更完整的提示词,包含调参、无障碍和接入步骤。