[英]Overflow scroll doesn't work on tailwind css
I can see that scrollbar on x-axis.我可以在 x 轴上看到那个滚动条。
But, when using mouse wheel on that section it didn't work..但是,在该部分使用鼠标滚轮时,它不起作用..
If you know, please help me..如果你知道,请帮助我..
This is my code这是我的代码
<div className="flex space-x-3 overflow-scroll p-3 -ml-3">
{cardsData?.map(({ img, title }) => (
<MediumCard key={img} img={img} title={title} />
))}
</div>
and mediumCard code和中卡代码
const MediumCard = ({ img, title }) => {
return (
<div className="cursor-pointer transform transition hover:scale-105 duration-300 ease-out ">
<div className="relative h-80 w-80">
<Image src={img} layout="fill" className="rounded-xl" />
</div>
<h3 className="text-2xl mt-3">{title}</h3>
</div>
);
};
Please add width and height to this请为此添加宽度和高度
<div className="w-[100vw] flex space-x-3 overflow-scroll p-3 -ml-3">
{cardsData?.map(({ img, title }) => (
<MediumCard key={img} img={img} title={title} />
))}
</div>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.