Skip to content

Commit ac9890e

Browse files
committed
Animate FAQ icon toggle and remove scroll animations from FAQ items
1 parent b4823f2 commit ac9890e

2 files changed

Lines changed: 25 additions & 12 deletions

File tree

assets/css/styles.css

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,7 @@ input::-webkit-inner-spin-button {
13021302
border-color: transparent;
13031303
cursor: pointer;
13041304
color: var(--color-secondary);
1305+
position: relative;
13051306
transition: all 0.3s linear;
13061307
}
13071308

@@ -1323,31 +1324,43 @@ input::-webkit-inner-spin-button {
13231324
letter-spacing: 0.1rem;
13241325
}
13251326

1327+
.plus-icon,
13261328
.minus-icon {
1327-
display: none;
1329+
transition: opacity 0.3s ease;
1330+
}
1331+
1332+
.minus-icon {
1333+
opacity: 0;
1334+
position: absolute;
1335+
top: 50%;
1336+
left: 50%;
1337+
transform: translate(-50%, -50%);
13281338
}
13291339

13301340
.show-text .minus-icon {
1331-
display: inline;
1341+
opacity: 1;
13321342
}
13331343

13341344
.show-text .plus-icon {
1335-
display: none;
1345+
opacity: 0;
13361346
}
13371347

13381348
.answer__text {
1339-
padding: 1rem 0 1.5rem 0;
13401349
border-top: 1px solid rgba(0, 0, 0, 0.2);
1341-
display: none;
1350+
max-height: 0;
1351+
overflow: hidden;
1352+
opacity: 0;
1353+
transition: max-height 0.3s ease, opacity 0.3s ease;
13421354
}
13431355

13441356
.answer__text p {
13451357
margin-bottom: 0;
1346-
overflow: hidden;
1358+
padding: 1rem 0 1.5rem 0;
13471359
}
13481360

13491361
.show-text .answer__text {
1350-
display: block;
1362+
max-height: 1000px;
1363+
opacity: 1;
13511364
}
13521365

13531366
@media screen and (max-width: 300px) {

faq.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h1 class="block__header faq__header">Frequently Asked Questions</h1>
3333
<!-- Questions -->
3434
<div class="center-align">
3535
<!-- Question text -->
36-
<article class="question" data-aos="zoom-in-up">
36+
<article class="question">
3737
<div class="question__content">
3838
<p>
3939
Do you offer remote assistance?
@@ -56,7 +56,7 @@ <h1 class="block__header faq__header">Frequently Asked Questions</h1>
5656
</div>
5757
</article>
5858
<!-- Question text -->
59-
<article class="question" data-aos="zoom-in-up">
59+
<article class="question">
6060
<div class="question__content">
6161
<p>
6262
How do I know if my computer needs virus protection or removal services?
@@ -78,7 +78,7 @@ <h1 class="block__header faq__header">Frequently Asked Questions</h1>
7878
</div>
7979
</article>
8080
<!-- Question text -->
81-
<article class="question" data-aos="zoom-in-up">
81+
<article class="question">
8282
<div class="question__content">
8383
<p>
8484
How long does it take to recover my data?
@@ -100,7 +100,7 @@ <h1 class="block__header faq__header">Frequently Asked Questions</h1>
100100
</div>
101101
</article>
102102
<!-- Question text -->
103-
<article class="question" data-aos="zoom-in-up">
103+
<article class="question">
104104
<div class="question__content">
105105
<p>
106106
What are your fees?
@@ -131,7 +131,7 @@ <h1 class="block__header faq__header">Frequently Asked Questions</h1>
131131
</div>
132132
</article>
133133
<!-- Question text -->
134-
<article class="question" data-aos="zoom-in-up">
134+
<article class="question">
135135
<div class="question__content">
136136
<p>
137137
If I face a tech problem outside your working hours, what should I do?

0 commit comments

Comments
 (0)