html播放youtube
嵌入YouTube视频
iframe代码
<iframe width="100%" style="min-height: 260px;position: absolute;top: 0;bottom: 0;margin: auto 0;" src="https://www.youtube.com/embed/FskRmY22jXqbY"这是一个嵌入YouTube视频的iframe代码。通过此代码,可以在网页上直接播放指定的YouTube视频。iframe的宽度设置为100%,而高度通过style属性进行调整,确保视频在页面中垂直居中显示。
frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>
</iframe>