开发者

GWT - How to put Widget B on Widget A - help

I am looking someway to put widgets on each other (each on its layer or something...). Something like the Swing CardLayout but with a transparent background support.

For example

I have

Image img=new Image("imageA.png");
HTML h=new HTML("<img s开发者_运维百科rc=imageB.png>");

How to put "h" on "img" left upper corner?

Any useful comment is appreciated


You can use AbsolutePanel. It positions it's children at fixed coordinates so you can make them overlap.


You can either use AbsolutePanel from GWT. Or you can use CSS set z-index of h higher than img and set absolute position from CSS as you want.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜