在锚点下添加文本

时间:2015-11-06 15:07:24

标签: html css

这是我的HTML:

<a href="/location/810"><img class="locationthumb" src="/act/locationthumb/810"></a>
<a href="/location/785"><img class="locationthumb" src="/act/locationthumb/785"></a>
<a href="/location/424"><img class="locationthumb" src="/act/locationthumb/424"></a>
<a href="/location/808"><img class="locationthumb" src="/act/locationthumb/808"></a>
<a href="/location/904"><img class="locationthumb" src="/act/locationthumb/904"></a>

他们彼此紧密对齐。这是一张图片:

lined up images

如何在每张图片下添加文字?

这是我的CSS:

.locationthumb {
  left: 0px;
  top: 0px;
  width: 160px;
  height: 160px;
  border: none;
  background-color: #e8e8e8;
}

0 个答案:

没有答案