1

我正在使用 HTMLPane 输出 html 代码。(smartgwt 3.0)

当 html 代码中包含图像时,我发现了一个问题。

这个问题只出现在FF身上,不能每次都重现。

看来FF不能很好地生产scrollbar。

预计:

在此处输入图像描述

有时 :

在此处输入图像描述

HTML 内容:

<table width='100%' height='100%' cellspacing='0'><tr><td valign='top' style='padding: 
8px;' class='HTMLPane''><div style='width:483px;'><div class='resize-cnt' 
id="containerId">@<br />
@<br />
@<br />
@<br />
@<br />
@<br />
@<br />
<br />
<br /></div><hr /><div class='resize-pic' align='center'><img
src='/fileIo.service?fileId=18a0989b-f10f-431b-b0cd-e498cec771d8&    
messageId=X2Y4Yzg3ZTgyLTk3Y2UtNDk3NC04M2U2LWZmODQ0MjVkYWM0Ni5yb290QDE4OS43Ni5jb21f'   
title='
xx.png' /></div>
</div></td></tr></table>


.resize-pic img { 
vertical-align: middle; 
max-width:100%;   /* FF IE7 */
max-height:100%; /* FF IE7 */
_width:expression(this.width > 800 && this.width > this.height ? 800: auto); 
_height:expression(this.height > 800 ? 800 : auto); /* IE6 */ 
}

.resize-cnt img { 
max-width:100%;   /* FF IE7 */
max-height:100%; /* FF IE7 */
}

我的图像来自一个 servlet。所以在给出html代码时我无法确定宽度和高度。

问题是如何在需要时不丢失scrollbar。

4

1 回答 1

0

使用带有 HTMLPanel的scrollPanel怎么样?这可能会帮助您避免 CSS 怪癖和技巧。

于 2013-09-17T09:40:02.120 回答