【问题标题】:bootstrap embed-responsive does not work with css column count?引导嵌入响应不适用于 css 列数?
【发布时间】:2016-09-24 15:55:59
【问题描述】:

bootstrap embed-responsive 不适用于 css column-count。例如:

/** Divide the target element into <number> columns */
.columns {
    -webkit-column-count: 4;
    -webkit-column-gap: 10px;
    /*-webkit-column-fill: auto;*/

    -moz-column-count: 4;
    -moz-column-gap: 10px;
    /*-moz-column-fill: auto;*/

    column-count: 4;
    column-gap: 15px;
    /*column-fill: auto;*/
}

.video-box {
   border: 1px solid red;
}
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<div class="container">
    <div class="columns">
        <div class="video-box">
            <!-- 16:9 aspect ratio -->
            <div class="embed-responsive embed-responsive-16by9">
                <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/qYv5R_e5hTM" frameborder="0" allowfullscreen></iframe>
            </div>
        </div>

        <div class="video-box">
            <!-- 16:9 aspect ratio -->
            <div class="embed-responsive embed-responsive-16by9">
                <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/feQ99SuGdsw" frameborder="0" allowfullscreen></iframe>
            </div>
        </div>

        <div class="video-box">
            <!-- 16:9 aspect ratio -->
            <div class="embed-responsive embed-responsive-16by9">
                <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/r_KEWddTrVc" frameborder="0" allowfullscreen></iframe>
            </div>
        </div>
    </div>
</div>

结果:

第二个和第三个视频没有显示!

任何想法为什么以及如何解决它?

注意:

这似乎是 Chrome 上的一个错误。火狐很好。

【问题讨论】:

标签: html css twitter-bootstrap column-count


【解决方案1】:

最后我使用来自http://masonry.desandro.com/ 的 jquery 插件来修复这个错误。忘记column-count吧!

【讨论】:

    猜你喜欢
    • 2021-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-10-19
    • 1970-01-01
    • 2021-12-16
    • 2017-04-02
    • 1970-01-01
    相关资源
    最近更新 更多