在html中嵌入视频会导致操作被取消

时间:2014-11-25 16:04:14

标签: 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>

1 个答案:

答案 0 :(得分:0)

我不知道为什么嵌入从生成的代码中省略http://部分。 它应该是

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