From 9055f9e62ede913df5489822a6220f3a70fa17b9 Mon Sep 17 00:00:00 2001 From: imeepos Date: Thu, 4 Sep 2025 21:42:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E9=BB=91=E8=BE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TemplateCard/index.css | 7 +++++++ src/components/TemplateCard/index.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/TemplateCard/index.css b/src/components/TemplateCard/index.css index 56025ec..9ff53e5 100644 --- a/src/components/TemplateCard/index.css +++ b/src/components/TemplateCard/index.css @@ -171,6 +171,13 @@ backface-visibility: hidden; } +/* 确保video的poster填满整个容器 */ +.single-video[poster] { + background-size: cover !important; + background-position: center !important; + background-repeat: no-repeat !important; +} + /* 视频样式 */ .full-video { width: 100%; diff --git a/src/components/TemplateCard/index.tsx b/src/components/TemplateCard/index.tsx index b5a05f0..68ef425 100644 --- a/src/components/TemplateCard/index.tsx +++ b/src/components/TemplateCard/index.tsx @@ -122,7 +122,7 @@ export default function TemplateCard({ template, onClick }: TemplateCardProps) { autoplay muted loop - objectFit='fill' + objectFit='cover' showPlayBtn={false} showCenterPlayBtn={false} showFullscreenBtn={false}