我正在用GWT2开发应用程序,并想添加浮动面板,坚持到屏幕底部(而不是页面,像facebook的聊天面板)。制作这种面板最好的方法是什么?
发布于 2010-04-14 08:04:35
如果我理解正确的话,您应该将以下样式应用于面板(任何基本面板都可以:FlowPanel、HTMLPanel等),并通过RootPanel.get().add(fixedPanel);将其添加到正文(它不一定是<body>,但我们知道它始终存在,不会被移除;)
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;发布于 2010-04-14 07:00:45
这可以通过将CSS属性position: fixed添加到有问题的div中来完成。
点击此处阅读更多信息:http://www.quirksmode.org/css/position.html
发布于 2010-04-14 07:09:08
我认为你可以通过CSS来做到这一点。所有你需要的是任何GWT面板,然后使用CSS样式它。查看http://www.lwis.net/journal/2008/02/08/pure-css-sticky-footer/
https://stackoverflow.com/questions/2633762
复制相似问题