gpt4 book ai didi

GWT Uibinder 图像显示但不调整大小

转载 作者:行者123 更新时间:2023-12-04 16:08:23 26 4
gpt4 key购买 nike

这张图片正在显示,但无论我使用的宽度或高度值如何,我都无法调整它的大小。有什么想法吗?谢谢。

<ui:with field='res' type='com.hellomvp.client.resources.MyResources'/>

<ui:style>
.fortaImage { width:'50px'; height:'50px';}
</ui:style>

<g:DockLayoutPanel unit='EM'>
<g:north size="10">
<g:FlowPanel>
<g:Image styleName='{style.fortaImage}' resource='{res.fortaLogo}'/>
<g:InlineLabel>FortaService</g:InlineLabel>
<g:ListBox></g:ListBox>
<g:InlineLabel>DateIn</g:InlineLabel>
<d:DateBox></d:DateBox>
<g:InlineLabel>DateOut</g:InlineLabel>
<d:DateBox></d:DateBox>
<g:Button>Cerca</g:Button>

</g:FlowPanel>
</g:north>



</g:DockLayoutPanel>

最佳答案

当您使用 <g:Image resource="..."/> 时, GWT 使用背景图像。在 CSS 2.1 中无法调整背景图像的大小。 (我真的希望这是可能的!)

您所能做的就是在服务器上拥有一个 50x50 像素版本的图像,或者使用 <g:Image url="..."/>反而。这会创建一个正常的 <img src="..."/>而不是背景图片,但您不能在此处指定 ClientBundle 资源。

关于GWT Uibinder 图像显示但不调整大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4217508/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com