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