-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
58 lines (49 loc) · 1.27 KB
/
styles.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
.accordion{
max-width: 400px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
border-radius: 5px;
overflow: hidden;
font-family: Verdana, Geneva, Tahoma, sans-serif;
background: #009578;
}
.accordion__label, .accordion__content{
padding: 14px 20px;
}
.accordion__label{
display: block;
color: white;
font-weight: 500;
cursor: pointer;
position: relative;
transition: background 0.1s;
}
.accordion__label:hover{
background: rgba(0, 0, 0, 0.1);
}
.accordion__label::after{
content: "";
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 20px;
width: 12px;
height: 6px;
background-image: url('data:image/svg+xml;utf8,<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg"><polygon points="0,0 100,0 50,50" style="fill:%23FFFFFF99;" /></svg>');
background-size: contain;
transition: transform 0.4s;
}
.accordion__content{
background-color: #ffffff;
line-height: 1.6;
font-size: 0.85em;
display: none;
}
.accordion__input{
display: none;
}
.accordion__input:checked ~ .accordion__content{
display: block;
}
.accordion__input:checked ~ .accordion__label::after{
transform: translateY(-50%) rotate(0.5turn);
}