html - 有没有办法在 YouTube iframe 上放置一个 div 标签以实现全屏显示?
问题描述
有没有办法在 YouTube 上放置一个 div 标签以iframe
实现全屏显示?
iframe
我可以使用以下代码在 YouTube 上放置一个 div 标签:
<html>
<head></head>
<body>
<div style="position:relative">
<iframe width="560" height="315" src="https://www.youtube.com/watch?v=tQ0yjYUFKAE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<div style="position:absolute;top:0px;left:0px;background:#000;width:500px;height:500px;"></div>
</div>
</body>
</html>
但是当iframe
上面的 YouTube 全屏时,添加的 div 标签会消失。
请让我知道是否有解决此问题的方法。
解决方案
推荐阅读
- python - 如果我使用 self 定义变量,为什么会产生错误?
- python - 如果我不停用环境 anaconda 会发生什么?
- python - 我得到与“http://127.0.0.1:5000/”的输出相同的“Hello world”,尽管在我的程序中没有提到这一点
- openshift - 带有数据库连接字符串的 Minishift/openshift 节点应用程序
- r - 数据框特定行中的前 5 个值
- ssl - 在增加服务器负载时,jmeter 开始获取 javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
- dart - 即使键盘打开如何修复容器位置
- java - 如何运行我的 Docker Image 并查看正在运行的应用程序?
- python-3.x - 无法使用 python 读取 .WAV 文件
- image - 将图像从单击的链接移至另一个路径;代码点火器