检测手机屏幕或分辨率?? [英] Detect mobile screen or resolution??

查看:403
本文介绍了检测手机屏幕或分辨率??的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我有移动网站.在此,我需要检测移动wap浏览器及其屏幕大小或分辨率..然后,相应地显示我的网站b.

因此,任何人都可以帮助检测wap浏览器和屏幕尺寸
我也想知道如何根据屏幕尺寸打开我的网站吗?

谢谢

Aditya Chavan

hello,

i have mobile website.. in this i need to detect mobile wap browser and its screen size or resolution.. so then my website b displayed accordingly.

so can any one help with detecting wap browser and screen size
and also i would i like to know how can i open my website according to the screen size??

thank you

Aditya Chavan

推荐答案

浏览器可以通过其用户代理来识别,大多数服务器端编程语言都允许您访问该浏览器(尚未指定)您使用过的内容).使用Google搜索的用户代理应该可以找到您常用的代理.

您不妨考虑制作一个移动版本,该版本使用相对大小的布局(如果浏览器支持,则使用CSS),并且可以使文本被窄屏包裹.恐怕我不知道是否可以使用屏幕分辨率.
The browser can be identified by it''s user-agent, which most server side programming languages allow you to access (you haven''t specified what you''ve used). Googling user agents should find you the common ones.

You may wish to consider producing a mobile version which uses a layout with relative sizes (using CSS, if supported by the browser) and that is tolerant to having the text wrapped by narrow screens. I''m afraid I don''t know if it''s possible to get the screen resolution in use.


这篇关于检测手机屏幕或分辨率??的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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