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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
| <style> * { box-sizing: border-box; margin: 0; padding: 0; font-family: Helvetica, "PingFang SC", "Microsoft Yahei", sans-serif; }
main { width: 100vw; min-height: 100vh; display: grid; align-items: center; justify-items: center; background-color: rgb(203, 210, 240); }
.container { width: 60%; max-width: 400px; box-shadow: 0 0 24px rgba(0, 0, 0, 0.15); border-radius: 24px; padding: 48px 28px; background-color: rgb(245, 246, 252); }
h1 { margin: 24px 0; font-size: 28px; color: #414873; }
.input-add { position: relative; display: flex; align-items: center; }
.input-add input { padding: 16px 52px 16px 18px; border-radius: 48px; border: none; outline: none; box-shadow: 0 0 24px rgba(0, 0, 0, 0.08); width: 100%; font-size: 16px; color: #626262; }
.input-add button { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(#c0a5f3, #7f95f7); border: none; outline: none;
color: #fff; position: absolute; right: 0;
cursor: pointer; }
.input-add .plus { display: block; width: 100%; height: 100%; background: linear-gradient(#fff, #fff), linear-gradient(#fff, #fff); background-size: 50% 2px, 2px 50%; background-position: center; background-repeat: no-repeat; }
.filters { display: flex; margin: 24px 2px; color: #c0c2ce; font-size: 14px; }
.filters .filter { margin-right: 14px; transition: 0.8s; cursor: pointer; }
.filters .filter.active { color: #6b729c; transform: scale(1.2); }
.todo-list { display: grid; row-gap: 14px; }
.todo-item { background: #fff; padding: 16px; border-radius: 8px; color: #626262; }
.todo-item label { position: relative; display: flex; align-items: center; }
.todo-item.done label { text-decoration: line-through; font-style: italic; }
.todo-item label span.check-button { position: absolute; top: 0; }
.todo-item label span.check-button::before, .todo-item label span.check-button::after { content: ""; display: block; position: absolute; width: 18px; height: 18px; border-radius: 50%; }
.todo-item label span.check-button::before { border: 1px solid #b382f9; }
.todo-item label span.check-button::after { transition: 0.4s; background: #b382f9; transform: translate(1px, 1px) scale(0.8); opacity: 0; }
.todo-item input { margin-right: 16px; opacity: 0; }
.todo-item input:checked + span.check-button::after { opacity: 1; } </style>
|