我想排列圖像水平和直接在這些圖像下我想申請文本,我會怎麼做呢?如何在文本上堆疊圖像?
這就是我在上次嘗試中嘗試過的,至今......沒有運氣!
我也使用引導程序,並在軌道應用程序的紅寶石做這個樣式,如果有幫助。謝謝!
HTML
<div class="our-story-pt-5">
<div class="container">
<h4>Our services include</h4>
<div class="row">
<ul>
<li>
<img class="img-responsive" src="img-1.jpg">
<p>Creative and Technology Strategy</p>
</li>
</ul>
<li>
<img class="img-responsive" src="img-2.jpg">
<p>Digital Product Development</p>
</li>
<li>
<img class="img-responsive" src="img-3.jpg">
<p>Technology Integration</p>
</li>
<li>
<img class="img-responsive" src="img-4.jpg">
<p>System Validation</p>
</li>
<li>
<img class="img-responsive" src="img-5.jpg"><br>
<p>Sustained Support and Enhancement</p>
</li>
</ul><!-- end ul -->
</div><!-- end div.row -->
</div><!-- end div.container -->
</div><!-- end div.our-story-pt-5 -->
CSS
div.our-story-pt-5 ul{
list-style: none;
text-align: center;
padding: 0px;
}
div.our-story-pt-5 li{
list-style-type: none;
color: #284179;
text-align: left;
line-height: 40px;
font-size: 22px;
display: inline;
width: 20%;
padding: 0px 5px;
p{
font-weight: 500;
font-family: 'Gotham-Bold';
line-height: 23px;
font-size: 16px;
margin-bottom: 0px;
letter-spacing: 0px;
color: #2c4d82;
}
}
div.our-story-pt-5 img{
margin-bottom: 12px;
}
.img-responsive{
display: inline-block;
height: auto;
max-width: 100%;
}
爲什麼你不使用Bootstrap自己的「col-xx-xx」類來將你的內容完美對齊?這將比使用UL> LI更好,我相信這並不適合結構 – IndieRok
我嘗試使用小列對齊內容,但仍然無法獲取圖像下的所有文本@IndieRok –