@LukaKobaidze
Posted
Hello!
To rotate arrow, you need to use following CSS property: transform: rotate()
.
I see that you toggle active
class once the element is clicked. Here's the code on how to implement arrow rotate:
.faq-cont.active > .faq-ques > img {
transform: rotate(180deg);
}
If you aren't familiar with >
selector, basically it selects direct child of the element (source). As you can see, class faq-ques
is direct child of faq-cont
, and img
is direct child of faq-ques
. If you want to be more specific, you can add class to img
and select it with the class.
Marked as helpful