【发布时间】:2018-09-13 06:20:05
【问题描述】:
我正在使用 Bootstrap v.3 构建一个网站,该网站需要跨设备保持一致。我希望在所有设备上保持相同的布局。我使用以下代码并排显示两个 youtube 视频。
<div class="row">
<div class="col-md-7 col-lg-7 col-sm-7 col-xs-7" id="introduction">
<p>The project uses Machine Learning to identify the waste items. A brief introduction about the Machine Learning technology is provided in the video below.
</p>
<iframe width="500" height="205" src="https://www.youtube.com/embed/yofjFQddwHE" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
<div class="col-md-5 col-lg-5 col-sm-5 col-xs-5">
<iframe src="https://www.youtube.com/embed/7YgnJELpMyE?ecver=2" width="450" height="305" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
</div>
</div>
该网站在桌面上看起来像这样 -
但是,在手机上,它看起来像这样。
如您所见,尽管 col-md-* col-sm-* 和 col-xs-* 的值相同,但布局会发生变化。请帮忙。
【问题讨论】:
-
你使用的是什么版本的 Bootstrap?
-
ver 3.3 。通过 CDN 导入
标签: html css twitter-bootstrap twitter-bootstrap-3 bootstrap-grid