我很难将这个iframe(youtube视频)居中。
我正在使用引导程序,这是我的代码:

<div class="su-youtube su-responsive-media-yes"><iframe
    width="400"
    height="320"
    src="http://www.youtube.com/embed/SGOc9P4Ynm?modestbranding=1&controls=0&iv_load_policy=3&rel=0&showinfo=0&color=white"
    frameborder="0"></iframe> </div>


我也尝试添加类“ center-block”和“ text-center”,还尝试从div中删除iframe。有任何想法吗?

最佳答案

CSS:

.su-youtube {
  margin: 0 auto;
  display: block;
}


CODEPEN EXAMPLE

关于html - bootstrap 中的iframe中心,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33420520/

10-12 07:22
查看更多