【发布时间】:2019-03-14 19:33:03
【问题描述】:
在台式机或笔记本电脑的所有尺寸上都能完美运行,但当我在移动设备上看到它时,它看起来就像图像一样。
.video {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
transform: translate(-50%, -50%);
}
<video controls autoplay muted loop id="myVideo">
<source src="img/Smartphone - 3180.webmsd.webm" type="video/webm">
</video>
In mobile instead of autoplaying it stays like that, the video is in webm format
【问题讨论】:
-
嗨@juan,请参考:stackoverflow.com/questions/38893692/…