禁用 YouTube 视频的 play/pause 按钮
Disable play/pause button of a YouTube video
我想要 hide/disable YouTube 视频的 pause/play 按钮。我无权访问 CSS 文件。我尝试了 Whosebug this link 中提到的答案。但它不起作用。有人可以帮忙吗?
这是我试过的,
<div style = "
background: #FFFF00;
">
<iframe
src="https://www.youtube.com/embed/cElhIDdGz7M?start=0&end=120&autoplay=1&controls=0&disablekb=1&rel=0"
allow="accelerometer;
autoplay;
encrypted-media;
gyroscope;
picture-in-picture"
allowfullscreen=""
width="560"
height="315"
frameborder="0"
></iframe>
</div>
我在这里禁用了它:
https://codepen.io/polinq/pen/mdyWmMm
iframe{
pointer-events: none; /* Disable any user interaction at all */
}
这就是你要找的吗?
我想要 hide/disable YouTube 视频的 pause/play 按钮。我无权访问 CSS 文件。我尝试了 Whosebug this link 中提到的答案。但它不起作用。有人可以帮忙吗?
这是我试过的,
<div style = "
background: #FFFF00;
">
<iframe
src="https://www.youtube.com/embed/cElhIDdGz7M?start=0&end=120&autoplay=1&controls=0&disablekb=1&rel=0"
allow="accelerometer;
autoplay;
encrypted-media;
gyroscope;
picture-in-picture"
allowfullscreen=""
width="560"
height="315"
frameborder="0"
></iframe>
</div>
我在这里禁用了它: https://codepen.io/polinq/pen/mdyWmMm
iframe{
pointer-events: none; /* Disable any user interaction at all */
}
这就是你要找的吗?