I am currently working on a Next.js application with Tailwind CSS. I would like to implement a feature where additional information is displayed when hovering over a product card, similar to the functionality seen on wildberries.ru. I have tried using 'group' and 'group:hover', but I'm facing issues with setting the background for an absolutely positioned div. How can I achieve this effect as shown in the image below?
[
Product Component:
const Product = (props) => {
return (
<div className='group rounded-md space-y-1 hover:bg-white hover:shadow-lg'>
<div className='relative'>
{/*Image*/}
</div>
<div className='flex flex-col'>
{/*Price, name, rating*/}
</div>
<div className='z-10 hidden absolute group-hover:flex'>
{/*Displayed on hover: Add to cart button and sizes*/}
</div>
</div>
);
};
export default Product;