Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6779932

Browse files
add task10 and update the answer of task 09
1 parent 15736d8 commit 6779932

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Hold Shift to Check Multiple Checkboxes</title>
6+
</head>
7+
<body>
8+
<style>
9+
10+
html {
11+
font-family: sans-serif;
12+
background:#ffc600;
13+
}
14+
15+
.inbox {
16+
max-width:400px;
17+
margin:50px auto;
18+
background:white;
19+
border-radius:5px;
20+
box-shadow:10px 10px 0 rgba(0,0,0,0.1);
21+
}
22+
23+
.item {
24+
display:flex;
25+
align-items:center;
26+
border-bottom: 1px solid #F1F1F1;
27+
}
28+
29+
.item:last-child {
30+
border-bottom:0;
31+
}
32+
33+
34+
input:checked + p {
35+
background:#F9F9F9;
36+
text-decoration: line-through;
37+
}
38+
39+
input[type="checkbox"] {
40+
margin:20px;
41+
}
42+
43+
p {
44+
margin:0;
45+
padding:20px;
46+
transition:background 0.2s;
47+
flex:1;
48+
font-family:'helvetica neue';
49+
font-size: 20px;
50+
font-weight: 200;
51+
border-left: 1px solid #D1E2FF;
52+
}
53+
54+
55+
</style>
56+
<!--
57+
The following is a common layout you would see in an email client.
58+
59+
When a user clicks a checkbox, holds Shift, and then clicks another checkbox a few rows down, all the checkboxes inbetween those two checkboxes should be checked.
60+
61+
-->
62+
<div class="inbox">
63+
<div class="item">
64+
<input type="checkbox">
65+
<p>This is an inbox layout.</p>
66+
</div>
67+
<div class="item">
68+
<input type="checkbox">
69+
<p>Check one item</p>
70+
</div>
71+
<div class="item">
72+
<input type="checkbox">
73+
<p>Hold down your Shift key</p>
74+
</div>
75+
<div class="item">
76+
<input type="checkbox">
77+
<p>Check a lower item</p>
78+
</div>
79+
<div class="item">
80+
<input type="checkbox">
81+
<p>Everything inbetween should also be set to checked</p>
82+
</div>
83+
<div class="item">
84+
<input type="checkbox">
85+
<p>Try do it with out any libraries</p>
86+
</div>
87+
<div class="item">
88+
<input type="checkbox">
89+
<p>Just regular JavaScript</p>
90+
</div>
91+
<div class="item">
92+
<input type="checkbox">
93+
<p>Good Luck!</p>
94+
</div>
95+
<div class="item">
96+
<input type="checkbox">
97+
<p>Don't forget to tweet your result!</p>
98+
</div>
99+
</div>
100+
101+
<script>
102+
</script>
103+
</body>
104+
</html>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /