我有每個滑塊5個圖像和所有不同的大小,我需要一種方法將所有圖像對齊到底部,以便它們都對齊良好,並且能夠在圖像之間添加相同的填充。對齊底部不同大小的圖像
我遇到的問題是所有圖像聚集在一起,並且圖像之間的填充不一致。
ul.building_images {
\t margin: 0;
\t padding: 0;
\t }
\t .building_images li {
\t width: 270px;
\t height: 270px;
\t list-style-type: none;
\t float: left;
\t margin: 2px;
\t margin-right: -62px;
\t /*border: 1px solid #000;*/
\t position: relative;
\t }
\t .building_images li img {
\t position: absolute;
\t top: 0;
\t left: 0;
\t }
\t img {
\t }
\t .building_images li:hover img {
\t /*width: 273px;*/
\t height: 273px;
\t /*background-color: blue;*/
\t z-index: 1;
\t }
<div id="randomContainer">
\t <div class="container">
\t <div class="row">
\t \t <ul class="building_images">
\t \t <li><img class="img1" src="<?php echourl(); ?>/images/slider/1.png" />
\t \t \t <div class="content_hidden1"><h3>Schools</h3>
\t \t <p>Learning environments are about more than books, papers and grades. It is about keeping the students and teachers comfortable in the classroom while saving the school as much money as possible.
\t \t \t </p></div>
\t \t </li>
\t \t <li><img class="img2" src="<?php echourl(); ?>/images/slider/2.png" />
\t \t \t <div class="content_hidden2"><h3>Commmercial</h3><p>Commercial buildings use over 60% of the electricity in the US, making energy efficiency more important than ever. Perfection has been an industry leader in providing energy efficient solutions while keeping comfort and serviceability in mind.</p>
\t \t </div>
\t \t </li>
\t \t <li><img class="img3" src="<?php echourl(); ?>/images/slider/3.png" />
\t \t \t <div class="content_hidden3"><h3>Civic</h3>
\t <p>Whether a project for a courthouse, jail, police department or small office in City Hall, we know that we have to design the most functional, energy efficient solution for a tight budget.</p>
\t </div>
\t \t </li>
\t \t <li><img class="img4" src="<?php echourl(); ?>/images/slider/4.png" />
\t \t \t <div class="content_hidden4"><h3>WAREHOUSE/LOGISTICS</h3>
\t \t <p>Perfection designs and installs mechanical systems for warehouse and distribution facilities.
\t \t <a href="/"><img src="">test</a>
\t \t </p>
\t \t </div>
\t \t </li>
\t \t <li><img class="img5" src="<?php echourl(); ?>/images/slider/5.png" />
\t \t \t <div class="content_hidden5"><h3>Health Care</h3>
\t <p>Perfection understands the complexity of doing construction and maintenance services in an active health care facility. Communication, safety and proper project management are the keys to a successful outcome in this industry.
\t \t </p></div>
\t \t </li>
\t \t </ul>
\t \t </div>
\t </div>
</div>
尋求調試幫助的問題(「爲什麼不是這個代碼工作?」)必須包含所需的行爲,特定的問題或錯誤以及在問題本身**中重現**所需的最短代碼。請參閱[**如何創建一個最小,完整和可驗證的示例**](http://stackoverflow.com/help/mcve) –
您是否希望圖像在「li」元素底部對齊文字),還是希望圖片留在文字上方,但其底線應該在同一高度? –
文字只是在點擊圖像時彈出,我已經發現了這些。 – Anthony