2010-04-13 50 views
3

我正在开发带有GWT 2的应用程序,并希望添加粘贴到屏幕底部的浮动面板(不是页面,如Facebook中的聊天面板)。制作这种面板的最佳方式是什么?GWT中的浮动面板

回答

4

如果我理解正确的话,你应该应用下面的风格到面板(任何基本的面板应该做的:FlowPanelHTMLPanel等),并把它添加到身体(它不到是<body>但我们知道,它总是在那里,并不会被删除;))通过RootPanel.get().add(fixedPanel);

position: absolute; /* Or fixed - depends on what you want */ 
right: 0; /* The part that puts the Panel in bottom right of the page/client area */ 
bottom: 0; 
2

这可以通过将CSS属性position: fixed添加到所讨论的div来完成。

更多在这里阅读:http://www.quirksmode.org/css/position.html

+0

但我怎么把它放在浏览器窗口的右下角? – Maksim 2010-04-13 23:06:34

+0

职位:固定; bottom:0px; right:0px; – 2010-04-14 04:55:38