-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdesign7.html
More file actions
125 lines (121 loc) · 3.16 KB
/
design7.html
File metadata and controls
125 lines (121 loc) · 3.16 KB
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
<!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>Document</title>
<style>
*{
margin:0;
padding:0;
font-family:consolas;
box-sizing: border-box;
}
body{
display:flex;
justify-content: center;
align-items: center;
min-height:100vh;
background:#001925;
}
.list{
padding:30px 75px 10px 30px;
position:relative;
background:#042b3e;
border-top:50px solid #03a9f4;
}
.list h2{
color:#fff;
font-size: 30px;
padding:10px 0;
margin-left:10px;
display: inline-block;
border-bottom: 4px solid #fff;
}
.list label{
position:relative;
display:block;
margin:40px 0;
color:#fff;
font-size:24px;
cursor: pointer;
}
.list input[type="checkbox"]
{
-webkit-appearance: none;
}
.list i{
position:absolute;
top:2px;
display:inline-block;
width: 25px;
height:25px;
border:2px solid #fff;
}
.list input[type="checkbox"]:checked ~ i{
top:1px;
border-top:none;
border-right: none;
height:15px;
width:25px;
transform:rotate(-45deg);
}
.list span{
position: relative;
left:40px;
transition: 0.5s;
}
.list span:before{
content:"";
position:absolute;
top:50%;
left:0;
width:100%;
height:1px;
background:#fff;
transform:translateY(-50%) scaleX(0);
transform-origin: right;
transition:transform 0.5s;
}
.list input[type="checkbox"]:checked ~ span:before{
transform:translateY(-50%) scaleX(1);
transform-origin: left;
transition:transform 0.5s;
}
.list input[type="checkbox"]:checked ~ span{
color:#154e6b;
}
</style>
</head>
<body>
<div class="list">
<h2>CSS Only Item Check List</h2>
<label>
<input type="checkbox" name="">
<i></i>
<span>Go to sleep</span>
</label>
<label>
<input type="checkbox" name="">
<i></i>
<span>Go to school</span>
</label>
<label>
<input type="checkbox" name="">
<i></i>
<span>Do your homework</span>
</label>
<label>
<input type="checkbox" name="">
<i></i>
<span>Do your breakfast</span>
</label>
<label>
<input type="checkbox" name="">
<i></i>
<span>Play football with friends</span>
</label>
</div>
</body>
</html>