<html> <body> <div class="group card my-14 mx-3 w-80 h-100 bg-gray-800 rounded-xl text-white p-5 cursor-pointer"> <div class=" flex justify-between items-center text-2xl "> <i class='bx bx-heart'></i> <i class='bx bx-cart-alt'></i> </div> <div class="w-11/12 ml-2.5 group-hover:text-white group-hover:-rotate-20"> <img class="object-cover w-full h-full" src="./Images/Jordan.png" id="bannerImage" alt=""> </div> <div class="text-center uppercase text-xl text-green-600"> Jordan 1 <br> 9 </div> </div> </body> </html>
Explanation why styles based on parent state don't work. ................................................
Tailwind does not have a
-rotate-20
utility class. Change it to one of the known ones or use any value, such asgroup-hover:-rotate- [20deg]