change style

main
guofei 2024-11-06 13:29:37 +08:00
parent a286e07272
commit 7e5c800e35
1 changed files with 5 additions and 3 deletions

View File

@ -21,14 +21,16 @@ const data = [
];
export default function ChannelSwiper() {
const isMobile = /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent);
return (
<>
<div className="overflow-hidden flex items-center">
<Marquee speed={20}>
<Marquee speed={isMobile ? 15 : 50}>
{data.map((item, index) => {
return (
<div key={index} className="mx-8 max-w-[100px] w-auto h-[80px] flex items-center">
<img src={`https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/channel/${item.url}`} className={`${item.url.includes("chartboost") ? "translate-y-[-10px]" : ""}`} alt="" />
<div key={index} className="mx-8 max-w-[100px] w-auto h-[80px] flex items-center ">
<img src={`https://www-soyootech.oss-cn-hangzhou.aliyuncs.com/channel/${item.url}`} className={` ${item.url.includes("chartboost") ? "translate-y-[-16px]" : ""}`} alt="" />
</div>
);
})}