# Vimeo 嵌入在移动设备上留白过多

**URL:** <https://meta.discourse.org/t/vimeo-embeds-have-too-much-white-space-on-mobile/123420>\
**Category:** UX\
**Created:** [2019 年7 月 19 日 13:58 UTC](https://meta.discourse.org/t/vimeo-embeds-have-too-much-white-space-on-mobile/123420 "2019-07-19T13:58:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

作者： ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
发布日期： [2019 年7 月 19 日 15:28 UTC](https://meta.discourse.org/t/vimeo-embeds-have-too-much-white-space-on-mobile/123420/2 "2019-07-19T15:28:23Z")

</div>

这里发生的情况是，我们的 `iframe` 标签具有固定的宽度和高度，而 Vimeo 嵌入的视频会调整为 100% 宽度，高度自动。

其他嵌入在 oneboxes 中的视频在开始播放后也会出现这种情况，但它们会预见到尺寸变化，因此会利用整个容器空间并设置黑色背景。

例如，这是 Dailymotion 的情况：

 ![25%20AM](https://global.discourse-cdn.com/meta/original/3X/2/5/25d793ae1b6c6ad528598f526d3f8d4844e4eb2e.png)

我想我们在这里能做的最简单的事情就是给 Vimeo 的 iframe 添加一个黑色背景？效果会像这样：

 ![59%20AM](https://global.discourse-cdn.com/meta/original/3X/b/9/b9579a3cbaab36c83125129fc2036ea10d365777.png)

我们需要一个固定的高度，否则页面加载时布局会出现抖动……不确定我们是否可以/应该做一些更复杂的事情，比如确定宽高比并根据小屏幕调整尺寸（@techAPJ）？

---

_[View the full topic](https://meta.discourse.org/t/vimeo-embeds-have-too-much-white-space-on-mobile/123420)._
