<div class="videoContent">
<video src="视频地址" autoplay loop muted
preload="auto" width="100%" height="100%"></video>
</div>
.videoContent {
width: 100%;
height: 100%;
// display: block;
}
.videoContent video {
width: 100%;
height: 100%;
object-fit: fill;
// object-fit: cover;
}
如果外面还有大盒子 ,必须给大盒子设置宽高!!!