使用 iFrame 将 Youtube 频道嵌入 HTML

Pyt*_*ora 5 html youtube iframe

我正在尝试将 Youtube 频道嵌入到 HTML 页面中。

例如我取这个频道地址: http: //www.youtube.com/aaaa

我使用了这段代码:

<html>
<head>
</head>
<body>
    <iframe src="http://www.youtube.com/aaaa"></iframe> 
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

问题是它不起作用。我尝试了另一个网站,它有效。可能是什么问题?

bla*_*d Ψ -1

尝试这个:

<div name="iframe" style="width:100%; height:635px; border:2px solid grey; overflow:hidden">
  <iframe src="http://yourchannel-URL" style="width:100%; height:700px; margin-top: -65px" scrolling="true">
     If you can see this, your browser doesn't support iframes. Click <a href="http://mychannel.url">here to see my YouTube channel.</a>
  </iframe>
</div>
Run Code Online (Sandbox Code Playgroud)

这应该嵌入一个完整的 YouTube 频道,没有 YouTube 搜索栏。

  • 抱歉,但这对我不起作用。它只显示一个边框和其中的一条线。而已。也许你会找到另一种解决方案。 (3认同)