Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 859 Bytes

README.md

File metadata and controls

49 lines (36 loc) · 859 Bytes

CSS Interview Questions

How do you select all elements that use the class .panel

Answer
 const panels = document.querySelectorAll('.panel');

How do you add an event listener to an HTML element?

Answer
    panel.addEventListener('click', () => {
        removeActiveClass()
        panel.classList.add('active');
    });

How Do You Remove a class from an element?

Answer
    element.classList.remove('active');

How do You create an effect on button click?

Answer
    .btn:active {
        transform: scale(0.98)
    }

⬅️ BACK