【发布时间】:2017-12-26 07:12:17
【问题描述】:
大家好,感谢您抽出宝贵时间阅读本文。 我的问题如下。我试图将 2 个 youtube 视频放在同一行,这给我带来了一些问题。到目前为止,这是我所拥有的: html:
<div class="vimeo-wrapper">
<div class="vimeo-video-1 vimeo-standard">
<iframe width="560" height="315" src="https://www.youtube.com/embed/hygokYbjbeY?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
<div class="vimeo-video-2 vimeo-standard">
<iframe width="560" height="315" src="https://www.youtube.com/embed/O1XotwR0_H0?rel=0" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<h2 id="cotizacion" style="color: white; border-radius: 8px; background-color: #008cba; text-align: center; display: center; font-size: 20px; padding: 14px 40px;"><strong>FILL OUT THIS FORM AND GET YOUR QUOTE WITHIN AN HOUR (DURING BUSINESS DAYS)</strong></h2>
css:
.postid-2916 .vimeo-wrapper {
max-width: 980px;
position: relative;
margin: 0 auto;
border: 1px solid green;
padding-bottom:10px;
}
.postid-2916 .vimeo-standard {
float: left;
height: 300px;
width: 47%;
border: 1px solid #000;
margin: 10px;
}
.postid-2916 iframe {
width: 100%;
height: 100%;
}
.postid-2916 @media (max-width:767px) {
.postid-2916 .vimeo-standard {
float: none;
width: 80%;
margin: 0 auto;
padding-bottom: 10px;
}
}
.postid-2916 .clearfix:before, .clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.postid-2916 .clearfix:after {
clear: both;
}
不知何故这就是我得到的screenshot 似乎我的包装器不包括我的 2 个视频。知道是什么原因造成的吗?
【问题讨论】:
标签: css youtube embed responsive