JSP/HTML页面解析
我必须制作一个 JSP/HTML 页面。 如何在 JSP 上固定高度和宽度以实现分辨率,这适用于所有类型的显示器分辨率。如果您打开页面,那么它必须适合并且在任何类型的显示器上看起来都很好。
请教一下,如何在JSP中输入高度和宽度。
I have to make a JSP/HTML pages.
How to fix height and width on JSP for resolution, which will work for all kind of monitor resolution. If you open page then that must be fit and look good in any kind of monitors.
Please advise, how to put height and width in JSP.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你不需要做任何事。 HTML 页面,无论是静态的还是由 JSP 生成的,默认情况下都适用于所有显示器分辨率。所有内容都经过布局以填充屏幕的宽度(“液体布局”)。
只有当您通过“固定高度和宽度”,使用以下方法主动克服此功能时:
或 CSS:
时,您才会遇到页面在意外分辨率下不方便的问题。不要管它们,或者以百分比设置宽度,就可以了。
(实际上,大多数页面都是固定大小和可变元素的混合体,但确保主要文本内容位于液体容器中是避免可怕的水平滚动条的最重要的事情。)
You don't have to do anything. HTML pages, whether static or generated by JSP, work on all monitor resolutions by default. Everything is laid out to fill the width of screen you have (‘liquid layout’).
It's only when you actively defeat this feature, by ‘fixing height and width’, using a method such as:
or CSS:
that you have problems with pages being inconvenient on unexpected resolutions. Leave them alone, or set widths in percentages instead, and you'll be fine.
(In practice most pages are a mixture of fixed-size and variable elements, but making sure the main textual content is in a liquid container is the most important thing to avoid the dreaded horizontal scrollbar.)
首先——忘掉 JSP。它是一种服务器端技术。它与客户端上发生的任何事情的唯一关系是您从中输出的代码。
第二 — 阅读任意尺寸设计常见问题解答
第三 — 阅读Opera WSC。 CSS(万维网的表示语言)部分应该是优先考虑的内容(但首先你需要有良好的 HTML 基础)。
First — forget about the JSP. It is a server side technology. It's only relationship to anything that happens on the client is what code you output from it.
Second — read the Any Size Design FAQ
Third — read the Opera WSC. The section on CSS (the presentation language of the WWW) should be a priority (but you need a good HTML foundation first).