对响应式设计中“缩放"的思考 [英] Thinking of the 'zoom' in responsive design

查看:118
本文介绍了对响应式设计中“缩放"的思考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用HTML和CSS进行响应式设计,这是我的问题:

I am trying to do a responsive design with using HTML and CSS, here is my problem:

如果仅调整窗口大小,则布局适合;如果仅缩放窗口,则布局又适合,但我没问题,但是,如果在调整窗口大小时进行缩放,则布局会中断.

If you only resize the window, the layout fits and if you only zoom, layout fits again, I have no problem with it, but if you zoom when the window is resized, layout breaks a little.

找到有关此的解决方案重要吗?我对200%,300%的缩放级别没问题,大多数情况下400%或500%对我来说都有些问题.

Is it important to find a solution about this? I have no problem with 200%, 300% levels of zoom, mostly 400% or 500% make some problems to me.

推荐答案

通常,响应式布局不需要缩放,因为它适合设备/浏览器窗口,并且被设计为手指友好"的.为了解决这个问题,您可以使用以下viewport阻止用户缩放:

In general, a responsive layout shouldn't need to be zoomed because it fits the device/browser window and has been designed to be "finger-friendly". To help with that, you can use this viewport to stop users from zooming:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

这篇关于对响应式设计中“缩放"的思考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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