无法在iPhone上播放mp4视频

时间:2019-04-16 05:58:45

标签: html iphone video background mp4

我有一个可在网站上自动播放的mp4视频,但无法在iPhone上播放。 提到有关同一问题的其他问答,我在视频标签中添加了“ playsinline”。

但是它似乎无法正常工作,并且我的iPhone屏幕上什么也没有显示。

有人可以帮助我找出我的代码有什么问题吗?

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>

    <style>
        body {
            background: #ffffff;
            padding: 0;
            margin: 0;
        }

        video {
            width: 500px;
            height: 500px;
        }
    </style>
</head>

<body>

    <video autoplay loop muted playsinline class="video-background ">
        <source src="video01.mp4" type="video/mp4">
    </video>
    </div>
</body>

</html>

0 个答案:

没有答案
相关问题