效能
通過幀率: 平均 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 並給出靜止畫面,保證文字清晰、控制元件可用鍵盤操作。請寫原創程式碼,不要從付費或受限的元件庫複製。
更完整的提示詞,包含調參、無障礙和接入步驟。