我有三列想要排成一行的文本。我使用flex box来做到这一点,但是当我将浏览器缩小到某个点时,它们只是消失而不是缩小?我尝试将它们设置为flex-shrink:1;但它也不起作用。我对此非常陌生,因此将不胜感激。
.carousel-item {
min-height: 450px;
width: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.carousel-container{
position: relative;
background: url("../img/keyindoorbanner2.jpg") center center no-repeat scroll;
width: 100%;
background-attachment: fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
text-align: center;
}
.flex-container{
display: flex;
justify-content: space-around;
align-items: center;
height: 350px;
}
.flex-container div {
flex: 0 1 200px;
font-size: 18px;
<header>
<div class="carousel-container">
<h5 class="reviews-title">TITLE</h5>
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-item active" id="firstslide">
<div class="carousel-caption d-none d-md-block">
<div class="flex-container">
<div class="reviews-text1">"text"
<p class="reviews-buyername1">-Name</p></div>
<div class="reviews-text2">"text"
<p class="reviews-buyername2">-Name</p></div>
<div class="reviews-text3">"text"
<p class="reviews-buyername3">-Name</p></div>
</div>
</div>
</div>
<div class="carousel-item">
<div class="carousel-caption d-none d-md-block">
<div class="flex-container">
<div class="reviews-text1"> "text"
<p class="reviews-buyername1">-Name</p></div>
<div class="reviews-text2">"text"
<p class="reviews-buyername2">-Name</p></div>
<div class="reviews-text3">"text"
<p class="reviews-buyername3">-Name</p></div>
</div>
</div>
</div>
<div class="carousel-item">
<div class="carousel-caption d-none d-md-block">
<div class="flex-container">
<div class="reviews-text1">"text"
<p class="reviews-buyername1">-Name</p></div>
<div class="reviews-text2">"text"
<p class="reviews-buyername2">-Name</p></div>
<div class="reviews-text3">"text"
<p class="reviews-buyername3">-Name</p></div>
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</header>