无法在 GWT 中的全屏滚动视图内的面板中获取正确的背景图像
我在设置页面的主背景图像时遇到问题。
我有一个全屏滚动视图,其中有一个居中的〜1000px宽的流程面板。问题是我希望流程面板有一个从屏幕顶部到底部的背景图像,即使流程面板是半空的,以及当流程面板延伸到屏幕下方时 - 就像任何正常的网站一样。
如果您在页面加载/调整大小时将 flowpanel 的高度设置为屏幕的高度,则它会正常工作,直到 flowpanel 扩展为大于屏幕 - 此时背景图像停止在原始设置的高度,就像背景图像一样其本身不会随流程面板一起调整大小。
如果我最初不调整流程面板的大小,它会很好地扩展,但是在流程面板的高度以下没有任何背景图像,直到它填满屏幕。
我无法将背景图像放在滚动面板本身中,因为当滚动条出现时,内部流程面板会向左移动滚动条的宽度,这会导致其内容与背景图像不对齐。
这肯定是构建页面的一种非常常见的方法,因此我肯定缺少一些解决方案。如果有帮助的话,该应用程序是针对 IE6 的。
I'm having trouble with setting the main background image for a page.
I've got a full screen scrollview, in which I have a centered ~1000px wide flowpanel. The issue is that I want the flowpanel to have a background image that goes from the top of the screen to the bottom, even when the flowpanel is half-empty, and when the flowpanel extends below the screen - just like any normal website.
If you set the height of the flowpanel at pageload/resize to the height of the screen it works properly until the flowpanel expands to become bigger than the screen - at which point the background image stops at the original set height, as if the background image itself is not resizing along with the flowpanel.
If I don't initially resize the flowpanel it expands fine, but you don't have any background image below the height of the flowpanel until it fills the screen.
I can't put the background image in the scrollpanel itself, because when the scrollbars appear the inner flowpanel is shifted to the left by the width of the scrollbar, which mis-aligns it's contents with the background image.
This must be a very common approach to building a page, so there must be some solution that I'm missing. The app is aimed at IE6 if that helps.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想我可能已经修复了它 - 我现在根据窗口大小在面板上设置了最小高度 + ie6 最小高度,然后随着窗口大小的变化而刷新。似乎工作正常。
I think I might have fixed it - I've now set a min-height + ie6 min-height on the panel depending on the window size, which then refreshes with a window size change. Seems to be working properly.