【发布时间】:2017-12-12 01:11:09
【问题描述】:
大家好,有一个简单的问题,在 bootstrap 3 中使用 flexbox,我似乎无法将我的图像放在屏幕中间,我得到了它,所以它在中间,但现在它在顶部屏幕而不是中心:
HTML:
<div class="parallaxb">
<div class="homeimgbarber">
<img class="img-responsive" src="img/cuts.png" style="margin: auto;">
</div>
</div>
CSS:
.parallax {
background-image: url("../img/c.png");
min-height: 1000px;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.homeimgbarber {
display: flex;
justify-content: center;
align-items: center;
}
【问题讨论】:
标签: html twitter-bootstrap css