html - 将视频嵌入html导致操作被取消

标签 html youtube

我试图将佳能D youtube音乐视频嵌入到我的html代码中,但显示操作已取消。如果嵌入代码直接从youtube嵌入代码复制而来。

YouTube嵌入代码:

    <iframe width="560" height="315" src="//www.youtube.com/embed/EW8XHKqz7Jg" frameborder="0" allowfullscreen></iframe>

有什么办法可以帮助我吗?注意:我使用Dreamweaver CC嵌入了此代码,页面中的其余代码是这个
Html Page Code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Personal Website</title>
<link rel="stylesheet" type="text/css" media="screen" href="WebMe.css">
</head>

<body>
<h1>The Other Side Of Me</h1>
    <div id="mainnav">
    <ul>    
        <li><a class="nav1" href="AboutMe.html">About Me</a></li>
        <li><a class="nav2" href="ShowCase.html">ShowCase</a></li>
        <li><a class="nav3" href="Hobby.html">Hobby</a></li>
        <li><a class="nav4" href="Contact.html">Contact</a></li>
    </ul>   
    </div>
<div id="bio">
        <h2 class="header">Hobby</h2>
        <p class="concenter">One of my hobby is playing music, below is one of my favourite piano piece</p>
        <figure id="showpic"><img src="image/Canon1.png" class="Fleft" width="300" height="500" alt="canon1"/></figure>
        <figure id="showpic"><img src="image/Canon2.png" width="300" height="500" alt="Canon2"/></figure>
        <p class="concenter">Canon in video varies from music sheet</p>
        <iframe width="560" height="315" src="//www.youtube.com/embed/EW8XHKqz7Jg" frameborder="0" allowfullscreen></iframe>
    </div>
</body>
</html>

最佳答案

我不知道为什么embed会从生成的代码中删除http://部分。
它应该是

<iframe width="560" height="315" src="http://www.youtube.com/embed/EW8XHKqz7Jg" frameborder="0" allowfullscreen></iframe>

关于html - 将视频嵌入html导致操作被取消,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27131415/

相关文章:

youtube - YouTube Data API v3 webhook 是否可用?

jquery - Bootstrap Youtube Modal 的按钮无法使用我无法修复的运行时错误进行测试

javascript - 为菜单添加高度

php - fpdf错误和 View 表错误

javascript - 使用javascript在本地保存的Keydown事件

javascript - 使用 YouTube iframe API 的播放列表不再有效?

Android - 单击时从 Webview 中的嵌入式 youtube 视频启动 Youtube 应用程序

javascript - 显示编码表情符号到 html 的百分比

css - 如何使 2 个 div 具有相同的高度,一个图像(没有 javascript)?

android - android webview youtube iframe喜欢在feedly吗?