【发布时间】:2015-11-11 07:00:43
【问题描述】:
我正在尝试将 YouTube 视频作为滑块的背景。就目前而言,视频位于完美的位置。我只想在黑条所在的地方放一张图片:https://www.dropbox.com/s/fjvlxamvjqtyx54/Screenshot%202015-08-18%2012.05.53.png?dl=0
这是我的代码:
<div id="slide_0" class="slide-content">
<div class="slide-bg" style="background: url('/assets/images/pages/home/home-background.jpg') center top no-repeat;background-size: cover;">
<iframe height="100%" width="100%" src="https://www.youtube.com/embed/6MWYmtT6bvc?rel=0&autoplay=1" frameborder="0" allowfullscreen></iframe>
</div>
<div class="slide-footer">
<table>
<tr class="middle">
<td>
<center>
</center>
<img class="logo" id="slider-logo" src="/assets/images/pages/home/heading-1.png" alt="">
</td>
</tr>
<tr class="bottom">
<td>
<div class="slide-caption">
<div class="content">
<span class="caption"><img class="globe" src="/assets/images/pages/home/globe1.png" alt="">Ray caters for international appointments and makes regular visits to Moscow, New York, The Middle East and most European Cities, stay tuned for the dates of his next trip.</button>
</div>
</div>
</td>
</tr>
</table>
</div>
</div>
我希望背景图片(第 2 行)成为视频的背景。
注意我是如何使用 height="100%" 和 width="100%" 的。在删除宽度属性时,我留下了:https://www.dropbox.com/s/pq2t4basz4lhf8a/Screenshot%202015-08-18%2012.09.03.png?dl=0
如果你能提供帮助那就太好了, 谢谢! 托比。
【问题讨论】: