-
Notifications
You must be signed in to change notification settings - Fork 0
/
accordion.css
83 lines (71 loc) · 1.46 KB
/
accordion.css
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
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
margin: 0;
padding: 0;
}
body {
align-items: center;
background:
radial-gradient(55% 330%, rgba(255, 255, 255, 0.5) 0%, rgba(0, 0, 0, 0.5) 550%),
linear-gradient(to top, rgba(255, 255, 255, 0.5) 0%, rgba(0, 0, 0, 0.6) 50%),
linear-gradient(to top right, rgba(255, 255, 255, 0.3) 0%, rgba(0, 0, 0, 0.3) 120%);
background-color: #DFE3E4;
background-blend-mode: color-burn, screen, color-burn;
display: flex;
font-family: sans-serif;
}
p {
margin: 0;
}
.wrapper {
margin: 0 auto;
max-width: 720px;
}
.accordion {
list-style: none;
margin: 0;
}
.accordion-item {
margin: 0 0 10px;
}
.accordion-title {
background: #6c7a89;
box-shadow: 0 1px 3px rgba(0,0,0,0.12),
0 1px 2px rgba(0,0,0,0.24);
border-radius: 20px;
color: #fff;
cursor: pointer;
padding: 10px 20px;
position: relative;
transition: box-shadow 0.3s ease;
user-select: none;
}
.accordion-title:not(.opened):hover {
box-shadow: 0 5px 8px rgba(0,0,0,0.25),
0 3px 3px rgba(0,0,0,0.22);
}
.opened.accordion-title {
background: #ff8563;
}
.accordion-text {
background: #f0f0f0;
border-radius: 0 0 20px 20px;
height: 0;
overflow: hidden;
padding: 0;
transition: padding-left 0.3s ease;
}
.opened + .accordion-text {
height: auto;
margin: -20px 0 0;
padding: 30px 20px 5px;
}
.accordion-text-item {
color: #4f4f4f;
list-style: none;
margin: 0 0 10px;
}