html5-video - iframe 不显示 youtube
问题描述
我已经搜索了几天嵌入视频的问题,但找不到该问题的正确解决方案。
我正在使用 Linux 上的 FF 在 localhost 上编辑购买的 web html5 模板。
的HTML
<!-- blog side -->
<section class="blog-side sp-seven blog-style-one standard-post video-post">
<div class="container">
<div class="row">
<div class="col-md-9 col-sm-12 col-xs-12 content-side">
<div class="blog-details-content">
<div class="wrapper">
<div class="videowrapper">
<iframe src="https://www.youtube-nocookie.com/embed/NNcvbxIODsY?start=15" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
</div>
CSS
.blog-side {
position: relative;
}
.wrapper {
margin: 0 auto;
}
.videowrapper {
position: relative;
padding-bottom: 56.25%;
padding-top: 25px;
height: 0px;
}
.videowrapper iframe {
position: absolute;
left: 0px;
top: 0px;
right: 0px;
bottom: 0px;
height: 100%;
width: 100%;
}
视频不显示,但收到此错误代码 -未找到文件:
我从 YT 获得的嵌入代码很长,并且有许多我不感兴趣的属性,并删除了其中一些结果相同的属性。
这可能是一个 .js 问题吗?
解决方案
你的 html 文件是怎么命名的?我认为您没有正确定位您的 html 文件(其中包含 iframe 和其余代码)。
我这样说是因为您的屏幕截图显示名为的文件<iframe width=...
不存在。
你的路径应该是这样的:
/home/esmeralda/Desktop/Belfast/myFile.html
在这里,myFile.html是包含源代码“iframe、css 样式等”的文件(扩展名为 .html) 。
推荐阅读
- opengl - GL_PIXEL_PACK_BUFFER 异步性如何工作?
- r - 如何用列名替换数据框中的 1
- android - 离线安装所有 android studio
- ios - 如何在 iOS 中发现 BLE Profile / Handle (swift)
- java - 使用 ResultSetMapper 解析结果时无法获取所有行
- hive - 停止 Hive 服务器 - Hortonworks hadoop
- java - 更改颜色时如何保留JButton背景样式?
- asp.net-core - ASP.CORE 将自定义文件夹添加到出版物
- r - R将列表转换为连续元素对
- excel - 选择范围直到特定字符串 VBA