vue.js

56 阅读1分钟
.main { position: relative; z-index: 2; border-top: 1px solid #e6e6e6; } .todo-list { margin: 0; padding: 0; list-style: none; } .todo-list li { position: relative; font-size: 16px; border-bottom: 1px solid #ededed; padding: 10px 0; } .todo-list li:last-child { border-bottom: none; } .toggle { text-align: center; width: 20px; height: 20px; position: absolute; top: 50%; transform: translateY(-50%); margin-left: 10px; border: 1px solid #ccc; border-radius: 50%; opacity: 0.7; } .toggle:checked { background-color: #00b894; border-color: #00b894; } .toggle + label { padding-left: 50px; display: block; line-height: 1.2; transition: color 0.4s; font-weight: 400; color: #484848; } .completed label { color: #949494; text-decoration: line-through; } .destroy { display: none; position: absolute; top: 50%; transform: translateY(-50%); right: 10px; width: 20px; height: 20px; font-size: 18px; transition: color 0.2s ease-out; border: none; background-color: transparent; } .todo-list li:hover.destroy { display: block; } .destroy:hover, .destroy:focus { color: #ff4757; } .destroy:after { content: "×"; }