gpt4 book ai didi

html - YouTube视频作为网页背景

转载 作者:行者123 更新时间:2023-12-03 05:29:01 25 4
gpt4 key购买 nike

我需要将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视频作为背景,但无法正常工作。
我尝试了这两个网址,但无法正常工作

https://youtu.be/UY9V5S9MEgk



Theese是我尝试过的URL

https://www.youtube.com/watch?v=UY9V5S9MEgk

最佳答案

复制您的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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com