我想調(diào)整圖像的大小,使水平滾動處于活動狀態(tài) 這是我的代碼:第一個組件
"use client";
import React from "react";
import Image from "next/image";
const BodyParts = () => {
return (
<Image
className="inline-block p-2 cursor-pointer hover:scale-110 delay-100 transition duration-250 ease-in-out "
src="/assets/gym.png"
alt="hero banner"
width={200}
height={200}
/>
);
};
export default BodyParts;
第二部分:
<div className=" relative items-center">
<div
id="slider"
className="w-full h-full flex overflow-x-scroll scroll whitespace-nowrap scroll-smooth"
>
{data.map((item) => (
<div
key={item.id || item}
itemID={item.id || item}
title={item.id || item}
>
<BodyParts
item={item}
bodyPart={bodyPart}
setBodyPart={setBodyPart}
/>
我用的是調(diào)節(jié)大小,而不是功能。