Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Task list</title>
- <style>
- * {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- font-family: sans-serif;
- }
- body {
- height: 100%;
- height: 100vh;
- width: 100%;
- display: grid;
- place-items: center;
- }
- .container-list {
- width: fit-content;
- height: fit-content;
- box-shadow: 0 5px 10px #ccc;
- border-radius: 8px;
- padding: 30px 20px 0 20px;
- border: 1px solid #ddd;
- }
- .list-title {
- color: #0061ff;
- text-align: center;
- }
- .list {
- margin: 40px;
- }
- .list-item {
- list-style: none;
- display: flex;
- align-items: center;
- margin: 20px 5px;
- }
- .list-item span {
- position: relative;
- width: 100%;
- height: 20px;
- margin-left: 20px;
- padding-right: 20px;
- color: #888;
- border-right: 2px solid red;
- transition: .2s ease-in-out;
- text-align: left;
- outline: none;
- overflow: hidden;
- white-space: nowrap;
- }
- .list-item input[type="checkbox"] {
- width: 20px;
- height: 20px;
- }
- input[type="checkbox"]:checked ~span {
- color: #ccc;
- border-right: 2px solid #28b545;
- }
- span::after {
- content: "";
- position: absolute;
- width: 0%;
- height: 1px;
- left: -4px;
- top: 9px;
- background: #ccc;
- pointer-events: none;
- transition: width .4s ease-out;
- }
- input[type="checkbox"]:checked ~span:after {
- width: 100%;
- }
- </style>
- </head>
- <body>
- <section class="container-list">
- <h1 class="list-title">My Tasks</h1>
- <ul class="list">
- <li class="list-item">
- <input type="checkbox">
- <span contenteditable="true">Task 1</span>
- </li>
- <li class="list-item">
- <input type="checkbox">
- <span contenteditable="true">Task 1</span>
- </li>
- <li class="list-item">
- <input type="checkbox">
- <span contenteditable="true">Task 1</span>
- </li>
- <li class="list-item">
- <input type="checkbox">
- <span contenteditable="true">Task 1</span>
- </li>
- <li class="list-item">
- <input type="checkbox">
- <span contenteditable="true">Task 1</span>
- </li>
- </ul>
- </section>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement