我需要 youtube 视频作为我的网页背景。 这是我的代码
<section class="about-section">
<div class="video-background">
<div class="video-foreground">
<iframe src="https://www.youtube.com/embed/UY9V5S9MEgk?controls=0&showinfo=0&rel=0&autoplay=1&loop=1&playlist=W0LHTWG-UmQ" frameborder="0" allowfullscreen></iframe>
</div> </div> </section>
这工作正常。我的问题是我需要使用以下 YouTube 视频作为我的背景,但它不起作用。 我尝试了这两个网址,但不起作用
这些是我尝试过的网址
最佳答案
复制 YouTube 视频的嵌入代码并将其替换为当前的代码
<iframe width="854" height="480" src="https://www.youtube.com/embed/UY9V5S9MEgk?controls=0&showinfo=0&rel=0&autoplay=1&loop=1&playlist=W0LHTWG-UmQ" frameborder="0" allowfullscreen></iframe>
关于html - YouTube 视频作为网页背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43691980/