html - 响应式 IFrame 视频

标签 html css iframe

我正在尝试在我的网站中嵌入一个谷歌驱动器视频。目前帧是响应的,但是在移动设备上观看时,视频不会缩小到帧大小。这意味着用户只能看到视频的上 Angular 。 如何使视频适合?

<div style="text-align:center; position: relative; height: 0; padding-bottom: 50%; overflow: hidden;"><iframe src="https://drive.google.com/file/d/1L2SPIlBhglFhGenByihjkgFcEVx1d2Th/preview" width="960" height="540"></iframe></div>

Screenshot of Video

最佳答案

试过在 head 标签中添加这个吗?

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

关于html - 响应式 IFrame 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47766556/

相关文章:

javascript - 使用本地存储和 JavaScript 保存计时器

javascript - 如何只打印首页

javascript - 查看器js仅显示index.html

Javascript 打开 iframe 并隐藏图像?

javascript - 防止 iframe 加载的特定 JS 在我的网站上运行

javascript - 页面首次加载时显示的侧边栏

html - 仅在菜单栏上填充左文本

html - 如何用 CSS 制作这种照明效果

html - 让一个 div 延伸到 CSS 中先前 div 的位置?

javascript - 将 <li> in <div> in <body> 全部居中对齐?