Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
GWT:与任何其他web应用程序一样适用于浏览器的组合_Gwt - Fatal编程技术网

GWT:与任何其他web应用程序一样适用于浏览器的组合

GWT:与任何其他web应用程序一样适用于浏览器的组合,gwt,Gwt,我是GWT的新手,现在才刚开始布局。 我创建了一个登录屏幕(布局:在页面的中心),然后在成功登录后移动到第二个页面,该页面有文档面板,并添加了一些组件 当我启动它时,它会出现在网页的中心。我希望它能够覆盖整个页面,具体取决于浏览器/屏幕的大小 我怎么去那里? 请帮忙 另外,请分享使用导航到2,3页的任何小型GWT应用程序(带有源代码)。这为我做到了。(覆盖是一个div,我想用它覆盖屏幕) 编辑 我使用了一个函数来避免覆盖滚动条 private static native int getScro

我是GWT的新手,现在才刚开始布局。 我创建了一个登录屏幕(布局:在页面的中心),然后在成功登录后移动到第二个页面,该页面有文档面板,并添加了一些组件

当我启动它时,它会出现在网页的中心。我希望它能够覆盖整个页面,具体取决于浏览器/屏幕的大小

我怎么去那里? 请帮忙

另外,请分享使用导航到2,3页的任何小型GWT应用程序(带有源代码)。

这为我做到了。(覆盖是一个div,我想用它覆盖屏幕)

编辑

我使用了一个函数来避免覆盖滚动条

 private static native int getScrollbarWidth() /*-{
    var body = $doc.body;
    body.style.overflow = 'hidden';
    var width = body.clientWidth;
    body.style.overflow = 'scroll';
    width -= body.clientWidth;
    if (!width)
        width = body.offsetWidth - body.clientWidth;
    body.style.overflow = '';
    return width;
  }-*/;
setWidth调用变为

 overlay.setWidth(Document.get().getBody().getClientWidth() - getScrollbarWidth() + "px");
div CSS如下所示

position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 6790;
margin: 0px !important;
background-color: rgb(0, 0, 0);
opacity: 0.8;

你能展示一下你目前掌握的代码吗?谢谢你的及时回复。你能分享完整的代码吗。这将有助于我理解如何使用您在项目中提到的代码。谢谢你,阿加尼刚刚做到了。Overlay是一个行元素(我使用的是GWT引导)。因此,它只是一个标签。我调用coverScreen()和overlay.setVisible(true)来显示它。有什么东西是你不能复制的吗?
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
z-index: 6790;
margin: 0px !important;
background-color: rgb(0, 0, 0);
opacity: 0.8;