【发布时间】:2021-02-22 14:38:05
【问题描述】:
我正在尝试使用 WordPress 中的静态首页方法创建一个启动类型页面,并且我正在尝试在页面加载时播放一个四秒的视频。我知道如何让视频自动播放,这不是问题。问题是视频没有显示。
我能够通过创建 front-page.php 模板文件来创建静态首页。我放在这个文件中的代码如下:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Iron Triangle Films Splash Page</title>
<link rel="stylesheet" href="css/styles.">
<style>
.mainContent{
margin-left: 275px;
}
</style>
</head>
<body>
<div style="border:solid 1px black;"class="mainContent">
<video id="my_video" height="500" width="700" autoplay>
<source src=itf.mp4 type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src=itf.ogv type='video/ogg; codecs="theora, vorbis"'>
<p>Your browser does not support HTML5 video.</p>
</video>
</div><!--End Main Content div-->
</body>
</html>
页面加载为首页,但视频不显示。这是link to the site。
【问题讨论】:
-
irontrianglefilms.com/itf.mp4 HTTP 404
-
感谢您的回复。为什么找不到呢?文件“itf.mp4”与 front-page.php 文件位于同一目录中。它甚至不需要进入另一个文件夹,例如“视频”文件夹。它应该能够找到它。什么不见了?我会很感激的。谢谢,CM –
标签: php html wordpress wordpress-theming