fix: 提交视频
This commit is contained in:
@@ -2,35 +2,21 @@
|
||||
|
||||
const FullScreenVideoBackground = ({}: {}) => {
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
position: 'relative',
|
||||
width: '100vw',
|
||||
height: '100vh',
|
||||
margin: 0,
|
||||
padding: 0,
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
>
|
||||
<div className='fixed inset-0 h-full w-full overflow-hidden'>
|
||||
<video
|
||||
autoPlay
|
||||
muted
|
||||
loop
|
||||
playsInline
|
||||
className='absolute inset-0 h-full w-full object-cover'
|
||||
style={{
|
||||
position: 'fixed',
|
||||
top: '50%',
|
||||
left: '50%',
|
||||
minWidth: '100%',
|
||||
minHeight: '100%',
|
||||
width: 'auto',
|
||||
height: 'auto',
|
||||
transform: 'translate(-50%, -50%)',
|
||||
zIndex: -1,
|
||||
}}
|
||||
>
|
||||
<source src={'/video.mp4'} type='video/mp4' /> {/* 传入本地视频路径,如 '/video.mp4' */}
|
||||
Your browser does not support the video tag.
|
||||
<source src='/video.mp4' type='video/mp4' />
|
||||
</video>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user