答案 0 :(得分:2)
您可以使用引导辅助类.center-block
和.text-center
来集中内容
<div class="col-md-6">
<div class="testimonial-section center-block">
Denim you probably haven't heard of. Lorem ipsum dolor met consectetur adipisicing sit amet, consectetur adipisicing elit, of them jean shorts sed magna aliqua. Lorem ipsum dolor met.
</div>
<div class="testimonial-desc text-center">
<img src="https://placeholdit.imgix.net/~text?txtsize=9&txt=100%C3%97100&w=100&h=100" alt="">
<div class="testimonial-writer">
<div class="testimonial-writer-name">Zahed Kamal</div>
<div class="testimonial-writer-designation">Front End Developer</div>
<a href="#" class="testimonial-writer-company">Touch Base Inc</a>
</div>
</div>
</div>
答案 1 :(得分:1)
您需要添加以下内容:
.testimonial-section {
margin: 0 auto;
}
.testimonial-desc {
text-align: center;
}
您可以选择添加以下内容:
.testimonial-section:after {
margin-left: 5px;
}
将成为:
答案 2 :(得分:0)
试试这个:
.testimonial-section { 保证金:0自动; }
答案 3 :(得分:0)
如果我理解你的话,你希望每个推荐都以其包含的div为中心吗?如何将SQLException
添加到margin-left: 25%;
和.testimonial-section
?