浏览器不能缩放到 400 像素以下? [英] Browser doesn't scale below 400px?

查看:14
本文介绍了浏览器不能缩放到 400 像素以下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个流动的样式表,效果很好.我注意到的一件事是,我在 Chrome 中的浏览器窗口不会调整到 400 像素以下,它只会卡在那里,而在 FF 中,当我缩小它时,它只会停在 400 像素左右,然后弹出一个水平滚动条.

I'm working on putting together a liquid style-sheet and it works wonderful. One thing that I've noticed is that my browser window in Chrome won't resize below 400px it just gets stuck there and in FF as I scale down it it just stops at around 400px and then pops a horizontal scroll bar.

当我在手机上打开网站时,它在 320 像素左右看起来很完美,所以我知道它的比例确实低于 400 像素.

When I open the site on my phone it looks perfect at around 320px, so I know it does scale lower than 400px.

我很好奇是否有人知道这是浏览器/桌面的问题,或者我是否应该查看 CSS 以外的内容.我没有任何最小宽度声明,所以我不确定是什么导致了这种情况.

I was curious if anyone knew if this was a browser/desktop thing or if I should be looking at something other than my CSS. I don't have any min-width declarations so i'm not sure what could be causing this.

再次在桌面上它缩小到大约 400 像素的最小宽度并停止,但是当我在手机上打开它时它会缩放到大约 320 像素的手机屏幕的大小......很好奇为什么在非常至少它不会缩小到桌面上的 320 像素.

Again on desktop it scales down to a min-width of about 400px and stops, but when I open it up on my phone it scales to the size of the phone screen which is roughly 320px... curious why at the very least it won't scale down to the 320px on desktop.

-编辑-另外,我不确定这是否重要,但 Opera 允许它缩小到几乎没有……所以它适用于 Opera,而不适用于 Chrome 或 FF……有任何想法吗?

-edit- Also I'm not sure if this matters but Opera allows it to scale down to pretty much nothing... So it works with Opera and not in Chrome or FF... any ideas?

推荐答案

Chrome 无法在 400px (OS X) 或 218px (Windows) 以下水平调整大小,但我有一个非常简单的解决方案:

Chrome cannot resize horizontally below 400px (OS X) or 218px (Windows) but I have a really simple solution to the problem:

  1. 将网络检查器停靠在右侧而不是底部
  2. 调整检查器面板的大小 - 您现在可以使浏览器区域非常小(低至 0px)
  1. Dock the web inspector to the right instead of to the bottom
  2. Resize the inspector panel - you can now make the browser area really small (down to 0px)

更新: Chrome 现在允许您在停靠在右侧时垂直排列检查器窗口!这确实改善了布局.

Update: Chrome now allows you to arrange the inspector windows vertically when docked to the right! This really improves the layout.

HTML 和 CSS 面板非常适合,您甚至还可以打开一个小型控制台面板.这让我可以完全从 Firefox/Firebug 转向 Chrome.

The HTML and CSS panels fit really well and you even open a small console panel too. This has allowed me to completely move from Firefox/Firebug to Chrome.

如果您想进一步查看网络检查器设置(齿轮图标,右下角),然后转到用户代理标签.您可以在此处将屏幕分辨率设置为您喜欢的任何值,甚至可以在纵向和横向之间快速切换.

If you want to go a step further look at the web inspector settings (cog icon, bottom-right), and goto the user agent tab. You can set the screen resolution to whatever you like here and even quickly toggle between portrait and landscape.

更新:这是我遇到的另一个非常酷的工具.http://lab.maltewassermann.com/viewport-resizer/

UPDATE: Here is another really cool tool I've come across. http://lab.maltewassermann.com/viewport-resizer/

这篇关于浏览器不能缩放到 400 像素以下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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