我有一个包含3行的容器流体

第1行:4张图片
第2行:4张图片
第3行:3张图片

我正在尝试将第3行居中,我尝试将第3行添加到另一个名为“容器”的类中,并在CSS中尝试了“左,右”,但是没有用,请您帮忙吗?



.b3 {
	padding-bottom: 20px;
}

.client-section {
	 -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
}

.img-responsive {
	padding-bottom: 10px;
}

#clients  {padding-top:10px;padding-bottom:50px;color: #7e7e7e; background-color:#151515;}

<section class="container-fluid client-section" id="clients">
    <div class="row">
        <div>
          <b class="col-lg-10
            col-md-10
            col-sm-10
            col-xs-10
            col-lg-push-1
            col-md-push-1
            col-sm-push-1
            col-xs-push-1 b2 b3">Clients</b>
        </div>
      </div>
      <div class="col-lg-10
            col-md-10
            col-sm-10
            col-xs-10
            col-lg-push-1
            col-md-push-1
            col-sm-push-1
            col-xs-push-1">
	<div class="row">
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-4">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-2">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
	</div>


	<div class="row">
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-4">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-2">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
	</div>

	<div class="row center">
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
	</div>
	</div>
</section>

最佳答案

这是你的解决方案



.b3 {
	padding-bottom: 20px;
}

.client-section {
	 -webkit-filter: grayscale(100%);
    filter: grayscale(100%);
}

.img-responsive {
	padding-bottom: 10px;
}
.center .img-responsive{
  margin:0 auto;
  display:block;
  }

#clients  {padding-top:10px;padding-bottom:50px;color: #7e7e7e; background-color:#151515;}

<div class="row">
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-4">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-2">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
	</div>


	<div class="row">
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-4">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-2">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
	</div>

	<div class="row center">
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
		<div class="col-lg-3">
			<img class="img-responsive" src="imgs/UserImage.png" width="200" height="200" />
		</div>
	</div>

关于html - 如何居中包含3张图像的引导行?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/40404056/

10-09 15:13