效能
通過幀率: 平均 60 fps,p5 59.5 · 長任務: 0 個,共 0 毫秒,最長 0 毫秒 · 原始碼 gzip 1.3 KB · 執行時 1.4 KB
giant-panda-93MIT開關Uiverse.io
elijahwgummer-poc 用純 HTML 和 CSS 做的開關。依 MIT 授權從 Uiverse.io 收錄,此處為即時預覽。
品質報告
等級和分數來自建置或測試時跑過的自動檢查。沒跑過的項目會標成「未檢測」,不會填假資料。
幀率: 平均 60 fps,p5 59.5 · 長任務: 0 個,共 0 毫秒,最長 0 毫秒 · 原始碼 gzip 1.3 KB · 執行時 1.4 KB
問題 0 · 讀屏: 通過
沒有持續動效
無溢出
幀率和長任務是在無介面的 Chromium 裡用軟體 WebGL 測的,只適合在本站元件之間比較,不代表實機表現。
不適用:靜止時沒有可見動畫;由懸停觸發的動畫沒有測試。
沒有 axe-core 違規。

檢測於 2026年11月15日 · 資料來自自動腳本,不是手工填寫。
以實際尺寸顯示。
複製內容以授權聲明開頭,使用程式碼時請保留。
<label class="switch">
<input type="checkbox">
<span class="slider"></span>
<span class="knob"></span>
</label>/* From Uiverse.io by elijahwgummer-poc - Tags: simple, switch, yes, no, animated, start/stop, wobble */
.switch {
display: inline-block;
position: relative;
width: 60px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
cursor: pointer;
background-color: #ff6b6b;
border-radius: 34px;
transition: background-color 0.3s ease;
}
.slider:before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: #ffffff;
border-radius: 50%;
transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.switch input:checked + .slider {
background-color: #66bb6a;
}
.switch input:checked + .slider:before {
transform: translateX(26px);
}
.slider:before {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.knob {
position: absolute;
top: 50%;
left: 4px;
transform: translateY(-50%);
width: 26px;
height: 26px;
background-color: #ffffff;
border-radius: 50%;
transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.switch input:checked ~ .knob {
transform: translateX(27px) translateY(-50%);
}控制項 · HTML · CSS · JS
直接改程式碼,再用控制項微調,預覽會隨輸入即時更新。

線上編輯每個元件,用控制項微調,下載完整原始碼,複製進階提示詞。
一次性 $49暫定價格
測試模式:不會真的扣款。
免費:預覽、複製按鈕和課程說明。
60px 的珊瑚色軌道和白色旋鈕,滑動時有彈性過沖,歡快又一眼就懂。
友好的應用設定和通知偏好。
改 #ff6b6b 軌道、選中色、26px 旋鈕和 cubic-bezier(0.68,-0.55,0.27,1.55) 彈跳。
用純 HTML、CSS 和 JavaScript(不用框架)做一個「珊瑚色彈跳開關」元件。60px 的珊瑚色軌道和白色旋鈕,滑動時有彈性過沖,歡快又一眼就懂。 適用場景:友好的應用設定和通知偏好。 開放這些可調項:改 #ff6b6b 軌道、選中色、26px 旋鈕和 cubic-bezier(0.68,-0.55,0.27,1.55) 彈跳。 支援淺色和深色主題,遵守 prefers-reduced-motion 並給出靜止畫面,保證文字清晰、控制元件可用鍵盤操作。請寫原創程式碼,不要從付費或受限的元件庫複製。
更完整的提示詞,包含調參、無障礙和接入步驟。