Spaces:
Running
Running
File size: 4,035 Bytes
0c7ec03 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | <!DOCTYPE html>
<html lang="zh-Hant">
<head><meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'none'; style-src 'unsafe-inline'; img-src data:; connect-src 'none'; font-src 'none'; frame-src 'none'; worker-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'"><meta name="referrer" content="no-referrer">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>漸層滑動核取按鈕</title>
<style>
/* From Uiverse.io by Shoh2008 */
.checkbox-wrapper-5 .check {
--size: 40px;
position: relative;
background: linear-gradient(90deg, #f19af3, #f099b5);
line-height: 0;
perspective: 400px;
font-size: var(--size);
}
.checkbox-wrapper-5 .check input[type="checkbox"],
.checkbox-wrapper-5 .check label,
.checkbox-wrapper-5 .check label::before,
.checkbox-wrapper-5 .check label::after,
.checkbox-wrapper-5 .check {
appearance: none;
display: inline-block;
border-radius: var(--size);
border: 0;
transition: .35s ease-in-out;
box-sizing: border-box;
cursor: pointer;
}
.checkbox-wrapper-5 .check label {
width: calc(2.2 * var(--size));
height: var(--size);
background: #d7d7d7;
overflow: hidden;
}
.checkbox-wrapper-5 .check input[type="checkbox"] {
position: absolute;
z-index: 1;
width: calc(.8 * var(--size));
height: calc(.8 * var(--size));
top: calc(.1 * var(--size));
left: calc(.1 * var(--size));
background: linear-gradient(45deg, #dedede, #ffffff);
box-shadow: 0 6px 7px rgba(0,0,0,0.3);
outline: none;
margin: 0;
}
.checkbox-wrapper-5 .check input[type="checkbox"]:checked {
left: calc(1.3 * var(--size));
}
.checkbox-wrapper-5 .check input[type="checkbox"]:checked + label {
background: transparent;
}
.checkbox-wrapper-5 .check label::before,
.checkbox-wrapper-5 .check label::after {
content: "· ·";
position: absolute;
overflow: hidden;
left: calc(.15 * var(--size));
top: calc(.5 * var(--size));
height: var(--size);
letter-spacing: calc(-0.04 * var(--size));
color: #9b9b9b;
font-family: "Times New Roman", serif;
z-index: 2;
font-size: calc(.6 * var(--size));
border-radius: 0;
transform-origin: 0 0 calc(-0.5 * var(--size));
backface-visibility: hidden;
}
.checkbox-wrapper-5 .check label::after {
content: "●";
top: calc(.65 * var(--size));
left: calc(.2 * var(--size));
height: calc(.1 * var(--size));
width: calc(.35 * var(--size));
font-size: calc(.2 * var(--size));
transform-origin: 0 0 calc(-0.4 * var(--size));
}
.checkbox-wrapper-5 .check input[type="checkbox"]:checked + label::before,
.checkbox-wrapper-5 .check input[type="checkbox"]:checked + label::after {
left: calc(1.55 * var(--size));
top: calc(.4 * var(--size));
line-height: calc(.1 * var(--size));
transform: rotateY(360deg);
}
.checkbox-wrapper-5 .check input[type="checkbox"]:checked + label::after {
height: calc(.16 * var(--size));
top: calc(.55 * var(--size));
left: calc(1.6 * var(--size));
font-size: calc(.6 * var(--size));
line-height: 0;
}
</style>
<style>
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #2c2d30;
margin: 0;
}
</style>
<style>.label .input,#lock,.checkbox-wrapper-35 .switch{display:block!important;position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;clip-path:inset(50%)!important}label:has(input:focus-visible),input:focus-visible+label,button:focus-visible{outline:2px solid #a4bc78;outline-offset:6px}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}</style></head>
<body>
<!-- From Uiverse.io by Shoh2008 -->
<div class="checkbox-wrapper-5">
<div class="check">
<input aria-label="漸層表情" checked="" id="check-5" type="checkbox">
<label for="check-5"></label>
</div>
</div>
</body>
</html>
|