大家下午好,“整页”applet(无javascript)的HTML代码?
我有一个Java小程序,我希望在网站上嵌入。我要求该小程序为全尺寸的,即它占据了网页的100%宽度和100%高度。
应该没有滚动条。
这是我目前拥有的代码:
<!doctype html>
<html>
<body style="background:red; width:100%; height:100%; padding:0; margin:0; border:0;">
<applet code="HelloWorld.class" style="padding:0; margin:0; border:0; width:100%; height:100%;">
Your browser does not support the <code>applet</code> tag.
</applet>
<!-- the applet should cover the entire page, so even though the body is red, it should be covered by the applet -->
</body>
</html>
出于某种原因,它不会在Firefox和IE浏览器。在Chrome中,该小应用程序似乎是高于页面本身的,因此显示了一个垂直滚动条。我们如何使小程序填充网页的确切大小,既不显示任何水平滚动条也不显示垂直滚动条? PS:如果可能的话,在JavaScript禁用的浏览器上工作的解决方案将很酷。
您可能想要在一大堆浏览器上测试它。上次我检查它时,有很多[混合结果](http://pscode.org/test/resize/)用于使用百分比值确定applet的大小。 (使用JS部署和调整applet的大小更安全),这种类型的东西是JS擅长的。 – 2012-04-03 01:57:50