将对象(图像)与底部对齐

Align an Object (Image) to the bottom

本文关键字:底部 对齐 图像 对象      更新时间:2023-09-26

我有一个带有索引的网页.html如下所示:

<img class="thumb" onclick="openPhoto(1);" src="img/images/campaign/1.jpg" width="710" height="533" alt="img"/>

我需要做的是将图像对齐在屏幕的底部中心,因为当我打开它们时,它们实际上出现在屏幕的顶部中心。

只使用CSS

.thumb
{
position:absolute;
bottom:0;
margin:auto;
width://your width accordingly;
}