html部分:
<video width="100%" height="100%" autoplay="autoplay" muted loop="loop">
<source src="../../assets/index/bg.mp4" type="video/mp4" />
</video>
css部分:
video::-webkit-media-controls {
display: none !important;
}
video {
object-fit: fill;
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
background: url('~@/assets/index/login-mp4-img.jpg') no-repeat
center/cover;
source {
width: 100%;
height: 100%;
}
}