【发布时间】:2014-02-13 03:03:16
【问题描述】:
由于某种原因,当我为网站上的某些图片添加 alt 标签时,它们的尺寸发生了变化。
www.dweeman.com/eb/sitetemplate.html 有 alt 标签
<table id="sidebar">
<tr id="sidebar">
<td><img src="images/photos/venetian_sample.gif" alt="venetian blind icon"></td>
<td id="sidebar"><a href="blinds.html#venetian">Venetian Blinds</a></td>
</tr>
</table>
www.dweeman.com/eb/index.html没有alt标签
<table id="sidebar">
<tr id="sidebar">
<td><img src="images/photos/venetian_sample.gif"></td>
<td id="sidebar"><a href="blinds.html#venetian">Venetian Blinds</a></td>
</tr>
</table>
它们都使用相同的样式表,并且在该 div 中具有完全相同的 HTML。
有人知道为什么会这样吗?我知道图像没有加载。它们还没有被制造出来。但我想解决这个问题,以防它们将来不加载,这样它最终不会让我的身体消失。
【问题讨论】:
-
所有图片都是404的?
-
如果您指的是图像现在的大小,它可能与替代文本的长度有关。您可以使用 CSS 设置大小以确保它们都是统一的。
-
是的,我还没有创建图像,但它们将是 50*50px。
-
问题应包含重现问题所需的代码。链接到实时页面是不够的。哦,没有“alt标签”。
-
抱歉,我在此站点上格式化代码时遇到问题。插入它似乎永远不会起作用,并且有很多东西可以证明这个问题。我修改了问题标题