一千萬個為什麽

搜索

GWT中的浮動面板

我正在使用GWT 2開發應用程序,並希望添加粘貼在屏幕底部的浮動面板(不是頁面,如facebook中的聊天面板)。制作這種面板的最佳方法是什麽?

最佳答案

If I understood you correctly, you should apply the style below to a Panel (any basic Panel should do: FlowPanel, HTMLPanel, etc) and add it to the body (it doesn't have to be <body> but we know that it's always there and won't be removed ;)) via 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;

轉載註明原文: GWT中的浮動面板