运行时如何找到浏览器的宽度和高度 [英] how we can find width&height of browser when it runing

查看:99
本文介绍了运行时如何找到浏览器的宽度和高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

i使用视觉stdio2008
感谢

i using visual stdio2008
thanks

推荐答案

克里斯蒂安(Cristian)给了您答案.但是,任何基于此信息的设计都是一个坏主意.取而代之的是,您应该设计一种布局,无论Web浏览器窗口的工作区大小如何,其表现都很好,而无需使用JavaScript,而只需使用CSS.避免绝对定位,使所有内容流畅.使其尽可能简单,但不要简单. :-)

—SA
Cristian gave you the answer. However, any design based on this information is a bad idea. Instead, you should design a layout which behaves nicely regardless of the size of the client area of the Web browser''s window, without using JavaScript, just CSS. Avoid absolute positioning, make everything fluid. Keep it as simple as possible, but not simpler. :-)

—SA


我想第一件事是向您解释互联网的工作原理.您的浏览器不在乎是什么生成了HTML,更不用说您使用了什么IDE.它不能告诉这些事情.您使用javascript来做到这一点.

此处 [ ^ ]是我通过在google中输入问题找到的文章.
I guess the first thing is to explain to you how the internet works. Your browser does not care what generated your HTML, let alone what IDE you used. It cannot tell these things. You use javascript to do this.

Here[^] is the article I found by typing your question in to google.


这篇关于运行时如何找到浏览器的宽度和高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆