我在col-sm-4 div中垂直对齐文本时遇到问题。如您所见,文本不是垂直对齐的。如何解决?
这是我的HTML代码
<div class="container">
<div class="row">
<h1 class="section-title"> HOW NIBOOK WORKS</h1>
<div class="col-sm-4"><img src="img/Profile.png" class="how-it-works-step-icon">
<h1 class="how-it-works-title">Become a "NI"booker</h1>
<h2 class="how-it-works-subtitle">Create your profile and start sharing your skills and services to locals</h2>
</div>
<div class="col-sm-4"><img src="img/bookmark.png" class="how-it-works-step-icon">
<h1 class="how-it-works-title">Get booked from locals</h1>
<h2 class="how-it-works-subtitle">Meet in your convenient place to provide your talent</h2>
</div>
<div class="col-sm-4"><img src="img/page.png" class="how-it-works-step-icon">
<h1 class="how-it-works-title">Receive your money</h1>
<h2 class="how-it-works-subtitle">Get your money directly to your account</h2>
</div>
</div>
</div>
&#13;
和我的css
.how-it-works-title {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 24px;
font-weight: bold;
line-height: 18px;
margin: 25px 0 15px;
text-align: center;
padding-top: 10px;
}
.how-it-works-subtitle {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 18px;
line-height: 18px;
margin: 25px 0 15px;
text-align: center;
padding-top: 10px;
font-weight: lighter;
padding-bottom: 10px;
}
.how-it-works-step-icon {
display: block;
margin: auto;
}
.section-title {
font-size: 28px;
font-color: #4C535D;
font-weight: bold;
line-height: 18px;
margin: 0;
padding-top: 50px;
padding-bottom: 60px;
text-align: center;
text-transform: uppercase;
}
.section-subtitle {
font-size: 15px;
font-weight: normal;
letter-spacing: 1.5px;
margin: 10px 0 0 0;
text-align: center;
}
&#13;
我是关于bootstrap,css等的新手,所以如果这是一个非常初学的问题我很抱歉