I'm struggling with these errors, can anyone help please.
The transform property for .card-inner should not be defined initially
The transform property for .card-inner element inside .card.opened should be set to rotateY(180deg)
HTML
.card-inner {
position: relative;
width: 100%;
height: 100%;
border-radius: 10px;
overflow: hidden;
transition: transform 0.6s;
}
.card.opened .card-inner {
transform: rotateY(180deg);
}
JS
const cards = document.querySelectorAll('.card');
cards.forEach(card => {
card.addEventListener('click', () => {
card.classList.add('opened');
})
} )