寻找一个jquery插件来调整/扩大浏览器,如果太小?(Looking for a jquery plugin to resize/expand browser if too small? [closed])
有没有一个jQuery的方式或插件来检测访客的浏览器窗口大小,当他们第一次来到页面,并自动伸展浏览器,如果它太小?
这是我见过的几次很常见的事情,所以我猜这里有人会知道这件事。
Is there a jquery way or plugin to detect the visitor's browser window size when they first come to the page and auto stretch the browser for them if it's too small?
It's a pretty common thing that I've seen done a few times, so I'm guessing someone here will know about it.
原文:https://stackoverflow.com/questions/2566536
最满意答案
您需要一个充当DNS服务器的盒子。
在我们的网络中,我们有一个mac mini服务器,它也充当DNS服务器。
我们进入新区域,如:mysite.dev 192.168.x.x (IP of you computer) www.mysite.dev mysite.dev
在智能手机中输入服务器的IP(WLAN应该与网络相同)就像DNS一样。
然后在手机上输入http://mysite.dev 。I found a REALLY simple way of doing it in the end. It was as simple as putting in my laptops IP address followed by :8888. It allows me to see the websites as I would straight on the machine!
相关问答
更多-
在Visual Studio 2010中测试移动网站的最佳方法是什么?(What is the best way to test a mobile website in Visual Studio 2010?)[2023-10-15]
他们把它拿出来的原因我猜测是移动空间有多种浏览器实现方式。 您最大的希望是为可用的最大平台(IPhone,BlackBerry,Droid ...)找到一组模拟器,您可以在这些模拟器中验证这些用户的体验。 单个模拟器在衡量其他平台上其他用户的体验方面做得不好。 The reason they took it out I'm guessing is that there are NUMEROUS browser implementations for the mobile space. Your best h ... -
最近宣布: https://developers.facebook.com/blog/post/2012/06/20/bringing-like-to-mobile/ Recently announced: https://developers.facebook.com/blog/post/2012/06/20/bringing-like-to-mobile/
-
发现了问题。 网站全宽度不需要所有媒体查询(尽管这是涵盖大多数设备的相当广泛的列表)。 正如我最初计划的那样,下面就足够了(overflow-x只是保险): body { overflow-x:hidden; width:100%; } 然而,我有一个二级导航元素,位置:绝对,左:100%和宽度:100%,这扭曲了手机上的实际网站宽度(导致一个非常宽的网站,可能与手机的分辨率一样宽) 。 一旦元素的左侧位置仅由JavaScript设置(而不是在初始网站加载时被手机读取),问题就解决了。 ...
-
第1点和第2点必须由用户代理检查完成。 这是相对容易的 - 如果您使用服务器端语言,您可以轻松查看User-agent:标头(请注意,它可能是欺骗性的!)。 您可以在http://www.useragentstring.com/pages/useragentstring.php找到完整列表,按浏览器排序。 例如,Safari页面包含所有iPad用户代理版本。 第3点将是第1点的改进 - 您需要使用其版本对用户进行cookie。 所以,在纯粹的JS中,这将是艰难的。 不是不可能,但很难。 Points 1 a ...
-
这是输出缓存和MVC DisplayModes错误的组合问题。 This was a combination issue with Output Caching and the MVC DisplayModes bug.
-
在本地测试移动网站(Testing mobile websites locally)[2022-02-16]
您需要一个充当DNS服务器的盒子。 在我们的网络中,我们有一个mac mini服务器,它也充当DNS服务器。 我们进入新区域,如: mysite.dev 192.168.x.x (IP of you computer) www.mysite.dev mysite.dev 在智能手机中输入服务器的IP(WLAN应该与网络相同)就像DNS一样。 然后在手机上输入http://mysite.dev 。 I found a REALLY simple way of doing it in the end. It ... -
使用Onsen-UI进行移动网站而非移动应用程序(Using Onsen-UI for Mobile Website and not for Mobile Application)[2024-04-14]
你觉得在移动网站上使用Onsen-UI而不是移动应用程序是好的吗? 它不是为此而制造的吗? 我认为Onsen UI最初是为开发移动应用而创建的。 但是,当我在我的本地网络服务器上采用Onsen UI并使用最新的Firefox,Chrome,Safari和Opera访问时,无论发生什么事,我都不确定是否有旧的浏览器。 移动浏览器中是否存在任何特定的移动API,但它们位于应用程序浏览器组件中? 我读过他们的文档和.js文件。 但是没有找到这样的API。 我认为没有这样的API。 Do you think it' ... -
测试移动网站?(Testing a website for mobile?)[2023-10-15]
如果您只想测试在某些视口宽度上触发的媒体查询,只需减小浏览器的宽度即可。 您可以在不同的媒体查询触发时观看UI更改。 您还可以使用浏览器插件来定义和设置视口分辨率。 我为Chrome使用“调整大小窗口”。 有一个Android模拟器,您可以在桌面上下载和运行,但这主要用于测试设备特定的功能。 归根结底,测试移动网站的最佳方式是在您定位的设备上。 If all you want to do is test the media queries firing on certain viewport widths ... -
测试移动网站[关闭](Testing Mobile Sites [closed])[2022-04-16]
http://mobiready.com/launch.jsp?locale=en_EN 仿真器 http://www.winwap.com/downloads.php http://developer.openwave.com/dvl/tools_and_sdk/phone_simulator/choosing.htm http://www.forum.nokia.com/info/sw.nokia.com/id/d57da811-c7cf-48c8-995f-feb3bea36d11/Nokia_Mob ... -
我更喜欢响应式设计。 在构建大型网站时,我只选择子域作为解决方案。 如果您采用响应式设计,请查看引导程序和基础知识。 http://getbootstrap.com/ http://foundation.zurb.com/ 我的建议: 您是否正在构建一个包含大量内容/数据的大型网站。 使用移动网站的子域。 如果它只是一个小企业的小网站。 使网站响应。 I prefer a responsive design. I only choose a sub-domain as solution when i'm b ...