定位图像替代文字 [英] Positioning image alt text

查看:92
本文介绍了定位图像替代文字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一张大型表格,其中有大量的条目对应于相同数量的图像。要求是为每个无法在服务器上找到的图像显示替代文本。 alt属性的工作正常。

I have a large table with a large number of entries corresponding to an equally large number of images. The requirement is to display an alt text for every image which could not be found on the server. The alt attribute of is working fine.

但是,我无法定位alt文本 - 单元格填充,间距,页边距等,这些图像不适用似乎适用于替代文字。

However, I am not able to position the alt text - cell padding, spacing, margins etc. which apply to the image do not seem to apply to the alt text.

与我们使用表格进行页面布局可能相关。

It may be of relevance that we are using tables for the layout of the page.

有人知道一个方法来定位alt文本吗?

Does anybody know a method to position the alt text?

推荐答案

img {
    width: 100px;
    height: 50px;
    line-height: 50px;
    text-align: center;
}

将竖直和水平对齐设置为中间。

Sets the alt vertical and horizontal align to middle.

这篇关于定位图像替代文字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆