这张图片正在显示,但无论我使用的宽度或高度值如何,我都无法调整大小.你有什么?谢谢.
<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>
Run Code Online (Sandbox Code Playgroud)
使用时<g:Image resource="..."/>,GWT使用背景图像.无法在CSS 2.1中调整背景图像的大小.(我真的希望有可能!)
您所能做的就是在服务器上拥有50x50px的图像版本,或者使用它<g:Image url="..."/>.这会创建正常<img src="..."/>而不是背景图像,但您无法在此处指定ClientBundle资源.
| 归档时间: |
|
| 查看次数: |
8118 次 |
| 最近记录: |