-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2021.5.23.手风琴二级菜单
173 lines (151 loc) · 5.18 KB
/
2021.5.23.手风琴二级菜单
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!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>山羊の前端小窝</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: 'Space Mono', monospace;
}
body {
display: flex;
justify-content: center;
}
.wrapper{
width: 600px;
margin: 10vh auto;
}
h1{
margin-bottom: 20px;
text-align:center;
}
input{
display: none;
}
label{
display: flex;
width: 100%;
height: 50px;
cursor: pointer;
border: 3px solid #3E474F;
user-select: none;
}
label div:first-child{
width: 100%;
line-height: 45px;
margin-left: 10px;
font-size: 1.2em;
}
.cross{
margin-right: 15px;
margin-top: 3px;
}
.cross::before,
.cross::after{
content: '';
border-top: 2px solid #3E474F;
width: 15px;
display: block;
margin-top: 18px;
transition: .3s;
}
.cross::after{
transform: rotate(90deg);
margin-top: -2px;
}
input:checked~label .cross::before{
transform: rotate(180deg);
}
input:checked~label .cross::after{
transform: rotate(0deg);
}
.content{
box-sizing: border-box;
font-size: 0.9em;
margin: 10px 10px;
max-height: 0px;
overflow: hidden;
transition: max-height,.5s;
}
input:checked~.content{
max-height: 400px;
transition: max-height,1s;
}
.SecondaryMenus{
margin-top: 20px;
max-height: 0;
overflow: hidden;
transition: max-height,.5s;
}
.SecondaryMenus label{
border: none;
box-shadow: none;
margin: 0;
}
input:checked~.SecondaryMenus{
max-height: 400px;
border-bottom: 2px solid #3E474F;
transition: 1s;
}
</style>
</head>
<body>
<div class="wrapper">
<h1>Accordion secndary menu</h1>
<div class="wrap-1">
<input type="radio" id="tab-1" name="tabs">
<label for="tab-1">
<div>First level menu - one</div>
<div class="cross"></div>
</label>
<div class="content">One kind of loneliness is that when you close your eyes, you can recall the
temperature, conversation, action, and details of the story. When you open your eyes, you feel that they
never happened. It is because life has a lot of passing, no intersection of loneliness, so we have to
start each time, good farewell.</div>
</div>
<div class="wrap-2">
<input type="radio" id="tab-2" name="tabs">
<label for="tab-2">
<div>First level menu - two</div>
<div class="cross"></div>
</label>
<div class="content">Youth, is a gorgeous dream, there will always be empty one day, but no matter how
lonely, thank you have accompanied me that moved.</div>
</div>
<div class="wrap-3">
<input type="radio" id="tab-3" name="tabs">
<label for="tab-3">
<div>First level menu - three</div>
<div class="cross"></div>
</label>
<div class="SecondaryMenus">
<div class="SecondaryMenu-wrap">
<input type="radio" id="SecondaryMenu-1" name="SecondaryMenu">
<label for="SecondaryMenu-1">
<div>SecondaryMenu - one</div>
<div class="cross"></div>
</label>
<div class="content">In infinite time, limited life, we are chasing the sun and the moon, chasing
the dream. Looking
back, we are far away from that pure dream.</div>
</div>
<div class="SecondaryMenu-wrap">
<input type="radio" id="SecondaryMenu-2" name="SecondaryMenu">
<label for="SecondaryMenu-2">
<div>SecondaryMenu - two</div>
<div class="cross"></div>
</label>
<div class="content">We, one day, will become me, because the happiness ahead will let you go, and
the footprints you
left are the basis for my stay.</div>
</div>
</div>
</div>
</div>
</body>
</html>