forked from apu52/Travel_Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
faq-website.css
100 lines (87 loc) · 1.59 KB
/
faq-website.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
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;800&display=swap");
* {
box-sizing: border-box;
}
.faq-container {
margin: 0 auto;
max-width: 600px;
}
.faq {
background-color: whitesmoke;
border: 3px solid #6a5acd;
border-radius: 25px;
margin: 20px 0;
overflow: hidden;
padding: 30px;
position: relative;
transition: 0.3s ease;
cursor: pointer;
}
.faq.active {
background: rgb(239, 239, 239);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1);
}
.faq.active::before,
.faq.active::after {
color: #2ecc71;
content: "\f075";
font-family: "Poppins" sans-serif;
font-size: 7rem;
left: 20px;
opacity: 0.2;
position: absolute;
top: 20px;
z-index: 0;
}
.faq.active::before {
color: #3498db;
left: -30px;
top: -10px;
transform: rotateY(180deg);
}
.faq-title {
margin: 0 35px 0 0;
color: #3685fb;
}
.faq-title:hover {
transform: scale(1.1);
font-size: 24px;
}
.faq-text {
display: none;
margin: 30px 0 0;
color: black;
}
.faq.active .faq-text {
display: block;
}
.faq-toggle {
align-items: center;
background: rgb(239, 239, 239);
border: 0;
border-radius: 50%;
cursor: pointer;
display: flex;
font-size: 1rem;
height: 30px;
justify-content: center;
padding: 0;
position: absolute;
right: 30px;
top: 30px;
width: 30px;
}
.faq-toggle .fa-times,
.faq.active .faq-toggle .fa-chevron-down {
display: none;
}
.faq.active .faq-toggle .fa-times {
color: #fff;
display: block;
}
.faq-toggle .fa-chevron-down {
display: block;
}
.faq.active .faq-toggle {
background-color: #9fa4a8;
}