-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
101 lines (101 loc) · 2.08 KB
/
main.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>todolist</title>
<style>
* {
margin: 0;
padding: 0;
}
.icon {
display: inline-block;
vertical-align: middle;
}
.icon-delete {
background-color: #DC544B;
background-image: url('./assets/delete.png');
background-repeat: no-repeat;
background-position: center center;
background-size: 16px 16px;
}
header {
background-color: #3498DB;
color: #fff;
display: flex;
height: 60px;
align-items: center;
padding: 5px;
}
header .title {
font-size: 18px;
font-weight: 700;
}
.con {
width: 350px;
}
.con .input {
display: flex;
height: 50px;
line-height: 50px;
}
.con .input input {
flex: 1;
outline: 0;
border: 0;
padding: 5px;
font-size: 14px;
}
.con ul li {
display: flex;
background-color: #fff;
align-items: center;
padding: 16px 5px;
position: relative;
}
.con ul li.done {
color: #888;
text-decoration: line-through;
font-style: italic;
}
.con ul li .options {
position: absolute;
right: 0;
top: 0;
height: 100%;
z-index: 2;
font-size: 0;
transition: .3s ease;
transform: translate3d(100%, 0, 0);
}
.con ul li .options .icon {
width: 30px;
height: 100%;
}
.con ul li:hover {
cursor: pointer;
}
.con ul li:hover .options {
transform: translate3d(0, 0, 0);
}
.con ul li:nth-child(odd) {
background-color: #ECF0F1;
}
</style>
</head>
<body>
<header>
<div class="title">TO DO LIST</div>
</header>
<div class="con">
<div class="input">
<input type="text" placeholder="add something" id="input">
</div>
<ul id="todolist"></ul>
</div>
<footer></footer>
<script src="./main.js"></script>
</body>
</html>