-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
135 lines (115 loc) · 2.9 KB
/
style.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
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
@import url('https://fonts.googleapis.com/css2?family=Muli&display=swap');
:root {
--text-fade-time: 0.5s;
--container-shrink-time: 1s;
}
* {
box-sizing: border-box;
}
body {
font-family: 'Muli', sans-serif;
background-color: #f0f0f0;
}
h1 {
margin: 50px 0 30px;
text-align: center;
}
.faq-container {
max-width: 600px;
margin: 0 auto;
}
.faq {
background-color: transparent;
border: 1px solid #9fa4a8;
border-radius: 10px;
margin: 20px 0;
padding: 30px;
position: relative;
overflow: hidden;
transition: 0.3s ease-in-out;
transition: background-color var(--container-shrink-time) ease-in-out var(--text-fade-time),
box-shadow var(--container-shrink-time) ease-in-out var(--text-fade-time);
}
.faq.active {
background-color: #fff;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1);
transition: background-color var(--container-shrink-time) ease-in-out, box-shadow var(--container-shrink-time) ease-in-out;
}
.faq::before,
.faq::after {
content: '\f075';
font-family: 'Font Awesome 5 Free';
color: #2acc71;
font-size: 7rem;
position: absolute;
opacity: 0;
top: 20px;
left: 20px;
z-index: 0;
transition: opacity var(--container-shrink-time) ease-in-out var(--text-fade-time);
}
.faq::before {
color: #3498db;
top: -10px;
left: -30px;
transform: rotateY(180deg);
}
.faq.active::before,
.faq.active::after {
opacity: 0.2;
transition: opacity var(--container-shrink-time) ease-in-out;
}
.faq-title {
margin: 0 35px 0 0;
}
.faq-text {
display: block;
font-size: 0.1px;
opacity: 0;
margin: 0;
padding: 0;
transition: margin var(--container-shrink-time) ease-in-out var(--text-fade-time), padding var(--container-shrink-time) ease-in-out var(--text-fade-time),
font-size var(--container-shrink-time) ease-in-out var(--text-fade-time), opacity var(--text-fade-time) ease-in-out;
}
.faq.active .faq-text {
opacity: 1;
font-size: inherit;
margin: 30px 0 0;
transition: margin var(--container-shrink-time) ease-in-out, padding var(--container-shrink-time) ease-in-out,
font-size var(--container-shrink-time) ease-in-out, opacity var(--text-fade-time) ease-in-out var(--container-shrink-time);
}
.faq-toggle {
background-color: transparent;
border: 0;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
padding: 0;
position: absolute;
top: 30px;
right: 30px;
height: 30px;
width: 30px;
}
.faq-toggle:focus {
outline: 0;
}
.faq-toggle .fa-times {
display: none;
}
.faq.active .faq-toggle .fa-times {
display: block;
}
.faq-toggle .fa-chevron-down {
display: block;
}
.faq.active .faq-toggle .fa-chevron-down {
display: none;
}
.faq.active .faq-toggle {
background-color: #9fa4a8;
color: #fff;
}