RWD:在移动版中显示桌面版本,无水平滚动 [英] RWD: Show Desktop version in mobile minified, without horizontal scroll

查看:81
本文介绍了RWD:在移动版中显示桌面版本,无水平滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

也许我的问题会有些奇怪,但我的客户想要从网站中移除一段时间的回应,并在行动版中看到桌面版本。

Maybe my question will be somehow odd but my client wants to remove responsiveness for some time from the site, and see desktop version in mobile.

首先我删除了响应式元标记,但在页面中获得水平滚动。

First I've removed responsive meta tag, but get horizontal scrolls in page. What I want is to see my website on iPhone as I see it in desktop, without any scrolls or zoom.

我使用bootstrap 3和我的容器有 min-width:1220px ,如果这将有所帮助。

I use bootstrap 3 and my container has min-width:1220px, if this will help.

更新:问题是从表, ,网站视图呈现为桌面(具有较小的文本等)。

Update: The problem is from table, when I remove table from the page, the website view is rendered as in desktop (with smaller text, etc). And this problem occurs only on iPhone.

推荐答案

您需要将视口设置为您希望显示的宽度在移动。对于你,你的 min-width 值,你会想要这样:

You'll need to setup the viewport to be the width you want it to display in mobile. For you, with your min-width value, you'll want something like this:

<meta name="viewport" content="width=1220">

请注意,内容宽度从 device-width 到您的宽度值。这将允许您想要的缩放。否则,浏览器将尝试采取一些默认值,它将对您的网站来说太小。具体来说,它会尝试920px宽,这就是为什么你得到一个水平滚动。

Note that the content width changed from device-width to your width value. This will allow the scaling you want. Otherwise, the browser will try to assume some defaults and it will be too small for your site. Specifically, it will try 920px wide, which is why you get a horizontal scroll.

这篇关于RWD:在移动版中显示桌面版本,无水平滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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