【问题标题】:Problems embedding youtube video嵌入 youtube 视频的问题
【发布时间】:2013-09-02 01:00:40
【问题描述】:

我开始对这段代码感到疯狂。它是如此简单,但它不起作用,我不明白为什么。

我正在尝试在 HTML 页面中嵌入 youtube 视频:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>
</head>

<body>
    <div style="font-family: 'NeubauGrotesk55Normal'; font-size: 32px; text-transform: uppercase; color: #0066b3; margin-left: 20px;">Add title</div>
    <div style="font-size: 16px; font-family: 'Georgia', 'Times New Roman', times, serif; color: #333333; margin-left: 20px; margin-top:20px;">Add text</div>

    <div style="margin-left: 20px; margin-top:20px;"><iframe width="853" height="480" src="//www.youtube-nocookie.com/embed/rzp7wHnX6jc?rel=0" frameborder="0" allowfullscreen></iframe></div>
</body>
</html>

有什么想法吗?

谢谢!

【问题讨论】:

    标签: html youtube embed


    【解决方案1】:

    ... src="//www.youtube... 中添加http: -> ... src="http://www.youtube...

    【讨论】:

    • 这很简单!我没有注意到我错过了 http 部分。我刚刚从 youtube 上复制了代码,太奇怪了。
    【解决方案2】:

    您的 YouTube 链接中缺少http:

    【讨论】:

    • 这很简单!我没有注意到我错过了 http 部分。我刚刚从 youtube 上复制了代码,太奇怪了。
    猜你喜欢
    • 2010-11-10
    • 2022-10-13
    • 2019-08-28
    • 2022-01-17
    • 2019-11-12
    • 2011-05-18
    • 2016-11-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多