html - Firefox 上的 bootstrap row-flexbox 不会换行

标签 html css less flexbox

我有一个使用 flex 模式的布局。它在 Chrome 和 Safari 中很好,但是在 Firefox 和 IE 中它看起来很糟糕。 这是我的 html:

<div ng-repeat="section in categorySections" class="row-flex row-flex-wrap">
    <div class="flex-col lesson-section col-md-12">
        <h2>{{ section.title }}</h2>
        <p>{{ section.description }}</p>
    </div>
    <div ng-repeat="lesson in section.lessons" class="col-md-3">
        <div class="panel flex-col">
            <div class="panel-title">
                <h3>{{ lesson.title }}</h3>
                <small>{{ lesson.date }}</small>
            </div>
            <div class="panel-body flex-grow">
                <p>{{ lesson.shortDescription }}</p>
            </div>
            <div class="panel-footer">
                <a href="#/chords/{{ lesson.id }}"><i class="fa fa-angle-right"></i> Continue</a>
            </div>
        </div>
    </div>
</div>

还有CSS:

.row-flex, .row-flex > div[class*='col-'] {  
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
flex:1 1 auto;
}

.row-flex-wrap {
    -webkit-flex-flow: row wrap;
    align-content: flex-start;
    flex:0;
}

.row-flex > div[class*='col-'], .container-flex > div[class*='col-'] {
     margin:-.2px; /* hack adjust for wrapping */
}

.container-flex > div[class*='col-'] div, .row-flex > div[class*='col-'] div {
    width:100%;
}

.flex-col {
    display: flex;
    display: -webkit-flex;
    flex: 1 100%;
    flex-flow: column nowrap;
}

.flex-grow {
    display: flex;
    -webkit-flex: 2;
    flex: 2;
}

这是它在 Firefox 中的样子: enter image description here

卡片应位于标题下方,而不是页面右侧。

有人帮我解决我做错的事吗?

最佳答案

{
    display:-moz-deck;
    width:100%;
}

关于html - Firefox 上的 bootstrap row-flexbox 不会换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38527758/

相关文章:

html - 背景颜色和图像之间的 CSS 淡入淡出

css - 在 LESS 中生成选择器列表

css - Twitter bootstrap.transition 的多重转换?

html - 表格的滚动条将文本推到左边?

javascript - 将 Node.js Express 变量传递给我的静态 javascript 文件

html - 在 AngularJS 中查找颜色相对于另一种颜色的百分比

html - 无法将 UL 标签居中

css - 图像伸出 body [wordpress 主题]

javascript - Twitter Bootstrap 选项卡突然停止工作

javascript - 如何解决 Less error "Uncaught (in promise) TypeError: Cannot read property ' 1' of null"