custom checkbox style

This commit is contained in:
KOWX712
2025-02-11 18:29:38 +08:00
parent f36f5bf7db
commit 006ca27100
2 changed files with 59 additions and 1 deletions

View File

@@ -40,6 +40,54 @@
display: flex;
align-items: center;
gap: 8px;
user-select: none;
}
.advanced-toggle .checkbox-wrapper {
position: relative;
display: inline-block;
width: 20px;
height: 20px;
margin-left: auto;
}
.advanced-toggle .checkbox {
opacity: 0;
position: absolute;
width: 0;
height: 0;
}
.advanced-toggle .custom-checkbox {
position: relative;
display: inline-block;
width: 100%;
height: 100%;
border: 2px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
transition: border-color 1s ease, transform 0.3s ease, background-color 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.advanced-toggle .tick-symbol {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) scale(0);
opacity: 0;
transition: transform 0.2s ease-out, opacity 0.3s ease;
}
.advanced-toggle .checkbox:checked + .custom-checkbox {
border-color: #007bff;
background-color: #007bff;
transition: border-color 0.1s ease;
animation: checked-bounce 0.3s ease-out;
}
.advanced-toggle .checkbox:checked + .custom-checkbox .tick-symbol {
transform: translate(-50%, -50%) scale(1);
opacity: 1;
}
.input-group {
@@ -52,6 +100,7 @@
padding-top: 10px;
font-size: 14px;
color: #666;
user-select: none;
}
.input-group input {
@@ -81,11 +130,13 @@
.auto-button {
background-color: #ddd;
user-select: none;
}
.save-button {
background-color: #007bff;
color: white;
user-select: none;
}
.hidden {