【发布时间】:2011-07-08 18:21:09
【问题描述】:
在带有 html 内容的 JEditorPane 中:
...
<img src="x.jpg" width="100" border="0" />
...
(例如图像是(500x700))
Firefox 或 chrome 或任何其他浏览器在页面上将此图像视为 100x140
(140 = 700 / (500/100))
但是 JEditorPane 将其显示为 100x20(我认为 20 是默认值)。 这是一个错误吗?
我能做什么,我不能更改 html 源,因为它在 CD-ROM 上。
提前致谢
福尔坎
编辑:引用的html文件内容:
<html msxsl="urn:schemas-microsoft-com:xslt" user="http://www.etiam.com/namespace" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy for Windows (vers 12 April 2005), see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<title></title>
</head>
<body vlink="#ffff00" style="background-color: rgb(0, 0, 0)" alink="#ffff00" link="#ffff00">
<h1>
<u>PAT 143</u>
</h1>
<h2>
ID : 100043
</h2>
<h2>
Birthdate : 2001/01/01
</h2>
<br>
<ul>
<li>
Study date: 2005/01/01 00:00<br><br>
</li>
<li style="list-style-position: outside; list-style-type: none; list-style-image: none">
<table border="0" width="90%" align="center">
<tr>
<td align="center">
<a href="aa1.htm"><img src="0.jpg" border="0" width="128">
</a>
</td>
<td align="center">
<a href="aa2.htm"><img src="3.jpg" border="0" width="128">
</a>
</td>
<td align="center">
<a href="aa3.htm"><img src="5.jpg" border="0" width="128">
</a>
</td>
</tr>
</table>
<p align="center">
click an image to select a series
</p>
</li>
</ul>
<br>
<br>
<br>
<p align="center">
<a href="/index.htm"><img src="retacc.gif" border="0">
</a> </p>
</body>
</html>
【问题讨论】:
-
在你的情况下,行高是 20 吗?
-
我用 html 文件编辑了消息。
-
你能发布 sscce (sscce.org) 吗?