我有每个滑块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