首页 \ 问答 \ 寻找一个jquery插件来调整/扩大浏览器,如果太小?(Looking for a jquery plugin to resize/expand browser if too small? [closed])

寻找一个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
更新时间:2023-10-23 16:10

最满意答案

您需要一个充当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!

相关问答

更多
  • 他们把它拿出来的原因我猜测是移动空间有多种浏览器实现方式。 您最大的希望是为可用的最大平台(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.
  • 您需要一个充当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而不是移动应用程序是好的吗? 它不是为此而制造的吗? 我认为Onsen UI最初是为开发移动应用而创建的。 但是,当我在我的本地网络服务器上采用Onsen UI并使用最新的Firefox,Chrome,Safari和Opera访问时,无论发生什么事,我都不确定是否有旧的浏览器。 移动浏览器中是否存在任何特定的移动API,但它们位于应用程序浏览器组件中? 我读过他们的文档和.js文件。 但是没有找到这样的API。 我认为没有这样的API。 Do you think it' ...
  • 如果您只想测试在某些视口宽度上触发的媒体查询,只需减小浏览器的宽度即可。 您可以在不同的媒体查询触发时观看UI更改。 您还可以使用浏览器插件来定义和设置视口分辨率。 我为Chrome使用“调整大小窗口”。 有一个Android模拟器,您可以在桌面上下载和运行,但这主要用于测试设备特定的功能。 归根结底,测试移动网站的最佳方式是在您定位的设备上。 If all you want to do is test the media queries firing on certain viewport widths ...
  • 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 ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)