具有相同图像的HTML多个图像标签仅多次显示一个图像而不是相同图像

时间:2017-12-14 19:16:18

标签: html image

我有一些带有动画GIF的HTML代码作为占位符,以便在浏览器等待这样的数据时显示:

<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
    <span class="count_top"><i class="fa fa-calculator"></i> Total Units</span>
    <div id="total_units_content" class="count" >
        <img border="0" id="avatar-green" alt="avatar-green" src="~/images/avatar-green.gif" width=50" height="50">
    </div>
    <span class="count_bottom"><i class="green">0% </i> From last Week </span>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
    <span class="count_top">
        <i class="fa fa-cloud"></i> Total units online
    </span>
    <div id="total_units_online_content" class="count" >
        <img border="0" id="avatar-green" alt="avatar-green" src="~/images/avatar-green.gif" width=50" height="50">
    </div>
    <span class="count_bottom">
        <i class="green"><i class="fa fa-sort-asc"></i>0% </i> From last Week
    </span>
</div>
<div class="col-md-2 col-sm-4 col-xs-6 tile_stats_count">
    <span class="count_top">
        <i class="fa fa-close"></i> Total units offline
    </span>
    <div id="total_units_offline_content" class="count green">
        <img border="0" alt="avatar-green" src="~/images/avatar-green.gif" width=50" height="50">
    </div>
    <span class="count_bottom"><i class="green">
        <i class="fa fa-sort-asc"></i>0% </i> From last Week
    </span>
</div>

问题是只显示第一张图片,而我只获取其他图片的替代文字。

有谁知道为什么会这样?

1 个答案:

答案 0 :(得分:1)

"上的所有图片代码都缺少width=50"。正确到width="50"