style(VideoPlayer): 调整控制栏样式

- 移除了 control bar 类名中的 `bottom-0`,以修复控制栏在隐藏时仍然占据空间的问题- 优化了 control bar 的显示和隐藏动画,使其更加流畅
This commit is contained in:
zhaoweijie 2025-08-25 20:52:34 +08:00
parent 901bc13526
commit f6bd08da49

View File

@ -348,7 +348,7 @@ const VideoPlayer = () => {
{/* 控制栏 - 使用与原始HTML相同的类名和行为 */}
<div
className={`absolute bottom-0 left-0 w-full bg-gradient-to-t from-black to-transparent p-4 transition-all duration-300 ease-in-out flex flex-col gap-2.5 ${showControls ? "bottom-0" : "-bottom-40"}`}>
className={`absolute left-0 w-full bg-gradient-to-t from-black to-transparent p-4 transition-all duration-300 ease-in-out flex flex-col gap-2.5 ${showControls ? "bottom-0" : "-bottom-40"}`}>
<div className="flex items-center justify-end gap-2 cursor-pointer" onClick={handleEnded}>
{<img src={logo} alt="logo" className="w-8" />}
<h2 className="text-xl font-bold text-white dark:text-zinc-300 mr-3">