为什么富内容中的HTML文本将图像显示为“图形”?

时间:2014-08-20 09:32:17

标签: html css

我正在开发一个项目,我希望将html文本重新分配给专为Web设计的富文本控件。这个富文本控件支持html doc来显示记录。

我在使用图片上传html时面临问题:

<font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">Test Embedded Image </span>
<span style="font-size: 8pt; font-family: 'Arial'; color: #000000;">graphic</span>
</div>
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">Text after image sd</span>
<div><table width=538 border=1 cellpadding=0 bordercolor="#414141" cellspacing=0>
<tr valign=top>
<td width=180 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">test </span>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_1.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_2.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
</tr>
<tr valign=top>
<td width=180 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_3.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 8pt; font-family: 'Arial'; text-decoration: underline; color: #0066cc;"> xxx</span>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 8pt; font-family: 'Arial'; text-decoration: underline; color: #0066cc;"> Web URL</span>
</div>
</font>
</td>
</tr>
</table>
</div>

但图像被替换为graphic文本,如图

所示

screenshot 1 screenshot 2

谁能告诉我为什么会这样?

1 个答案:

答案 0 :(得分:1)

img中的 alt 标记设置为图形。只有在找不到这些图像时才会显示。
检查图像是否在正确的目录中。

它正在使用 FIDDLE here