I am trying to do a developers' page in a website but I am encountering so problems. As you can see below I am trying to detect if a user is hovering on a certain card(.card) to 3d flip it.
I have realized that when it works, I would have called the .container before it, and if I don't it does't do anything.
I have tried doing: .container .card:hover .cardFlip { /code/ } but it also didn't work!
<div class="container">
<!-- Joe's Card -->
<div class="card" id="JoeGermany">
<h2>Joe Germany</h2>
<img src="JoeGermany.jpg" alt="Joe Germany" class="JoeImg">
</div>
<div class="cardFlip">
<div class="left"></div>
</div>
</div>
.container .card:hover {
transform: perspective(500px) rotateY(0deg);
}
This works! BUT!!
.card:hover .cardFlip {
transform: perspective(500px) rotateY(-30deg);
}
This does't work!!
Thank you for any help in advance! Please do not be too rough if I have missed a silly mistake because I am considered rather a beginner.