← 全部工具

CSS 核取方塊產生器

調整原生核取方塊的邊框、填色及勾選符號。

css-checkbox-generator本機處理

正在啟用本機工具…

工具設定

設定只留在本頁。重新載入後會恢復預設值。

功能參考查閱日期 2026-11-21 · ZeroServer

即時預覽與匯出

CSS

.checkbox-label {
  display: inline-flex;
  gap: 0.6rem;
  align-items: center;
  cursor: pointer;
  min-height: 44px;
}

.custom-checkbox {
  appearance: none;
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  border: 2px solid #64748b;
  border-radius: 3px;
  background-color: transparent;
  cursor: pointer;
}

.custom-checkbox:checked {
  background-color: #0e7490;
  border-color: #0e7490;
}

.custom-checkbox:checked::after {
  content: "";
  box-sizing: content-box;
  width: 4px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: translateY(-12%) rotate(45deg);
}

.custom-checkbox:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@media (forced-colors: active) {
  .custom-checkbox { appearance: auto; }
  .custom-checkbox::after { display: none; }
}

HTML

<label class="checkbox-label"><input class="custom-checkbox" type="checkbox"><span>核取方塊標籤</span></label>

如何使用這個工具

選擇預設或修改設定,查看即時預覽,再複製或下載樣式,以及可用的標記。

不適合用在什麼情況

請在實際使用匯出樣式的元件驗證色彩對比、位置及瀏覽器行為。