【问题标题】:How to make videos horizontally aligned in HTML 5如何在 HTML5 中使视频水平对齐
【发布时间】:2016-03-14 19:03:04
【问题描述】:

我想知道如何使视频水平对齐,以便它们在页面上并排排列。这是我想要实现的 richtechservice.weebly.com/intro.html 。如您所见,它们居中并并排放置。我怎么做?

<hr>

<div>
 
    <iframe width="560" height="315" src="https://www.youtube.com/embed/czpFFcw6Yfk" frameborder="0" allowfullscreen></iframe>

    <iframe width="560" height="315" src="https://www.youtube.com/embed/r2u2FS-gWmo" frameborder="0" allowfullscreen></iframe>
  

<div>
  <iframe width="560" height="315" src="https://www.youtube.com/embed/MvjlUrWo1KQ" frameborder="0" allowfullscreen></iframe>


  <iframe width="560" height="315" src="https://www.youtube.com/embed/F8qDtzlkFws" frameborder="0" allowfullscreen></iframe>
</div>

【问题讨论】:

  • 这个问题过于宽泛,我投票结束。如果您已经编写了代码并且需要帮助调试它以获得所需的行为,那么可以在 SO 上提供帮助。
  • 您的“链接”无效。
  • 您的链接确实有效,并且 sn-p 显示了您想要实现的目标。问题解决了吗?

标签: html video youtube


【解决方案1】:

把它们放在一个&lt;TABLE&gt;中,都放在同一个&lt;TR&gt;

可能需要把每个都放在自己的&lt;IFRAME&gt;

[编辑]

<table> <tr>
<td><iframe width="560" height="315" src="https://www.youtube.com/embed/czpFFcw6Yfk" frameborder="0" allowfullscreen></iframe></td>
<td><iframe width="560" height="315" src="https://www.youtube.com/embed/r2u2FS-gWmo" frameborder="0" allowfullscreen></iframe> </td>
<td><iframe width="560" height="315" src="https://www.youtube.com/embed/MvjlUrWo1KQ" frameborder="0" allowfullscreen></iframe></td>
</tr></table>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-24
    • 2020-10-08
    • 2014-09-11
    • 1970-01-01
    • 2013-04-25
    • 1970-01-01
    • 2013-09-24
    • 2020-11-09
    相关资源
    最近更新 更多