Skip to content

FAQ de pagina unica com perguntas e respostas prontas

Notifications You must be signed in to change notification settings

Theuz1nh0/FAQ-Accordion-Card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

Overview

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • Flexbox
  • Mobile-first workflow

What I learned

I learned to use the "overflow" CSS property and used JS and put into practice what little I've learned

function listener(question, answer, span, height, questionContent) {
    question.addEventListener("click", () => {
        const styleConfirm = span.style.transform == "rotate(-180deg)";

        if (styleConfirm) {
            span.style.transform = "rotate(0)";
            question.style.overflow = "hidden";
            question.style.height = "3rem";
            answer.style.color = "hsl(240, 6%, 50%, 0)";
            questionContent.className = "question-content";
        } else {
            span.style.transform = "rotate(-180deg)";
            question.style.overflow = "visible";
            answer.style.color = "hsl(240, 6%, 50%)";
            question.style.height = height + "px";
            questionContent.className = "question-content-clicked";
        }

    })
}

Author

About

FAQ de pagina unica com perguntas e respostas prontas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published