到“user-scalable=no"或不“user-scalable=no" [英] To "user-scalable=no" or not to "user-scalable=no"

查看:13
本文介绍了到“user-scalable=no"或不“user-scalable=no"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过不同的帖子,但一直没有得出明确的结论,在案例 A 或案例 B 上使用 user-scalable=no 有什么区别、优点和缺点?

I've read different threads but never got to a clear conclusion, what are the differences, advantages and disadvantages of using user-scalable=no on case A or case B?

我要做一个响应式网站,那哪种情况更好?

I'm going to do a responsive website, which case is better then?

案例 A:

<meta name="viewport" content="width=device-width, user-scalable=no">

案例 B:

<meta name="viewport" content="width=device-width"> 

推荐答案

您不需要使用 user-scalable=no 进行响应式网页设计.如果您希望您的 Web 应用程序感觉更像本机应用程序(在缩放方面),则可以使用它.您可以控制用户在放大时不会破坏您的设计.但从技术上讲,如果您在进行响应式设计并且在放大时您的设计会中断,那么您就做得不对.

You don't need to use user-scalable=no for responsive web design. You use it if you want your web app to feel more like a native app (in terms of zooming). You can control that users wont break your design if they zoom in. But technically, if you're doing responsive and your design breaks when zooming in, then you're not doing it right.

但是,如果您绝对需要使用它:...但是请记住,缩放是很多人都在使用的重要辅助功能.因此,只有在真正需要时才应将其关闭,例如对于某些类型的游戏和应用程序."http://dev.opera.com/articles/view/an-introduction-to-meta-viewport-and-viewport/

But, if you absolutely need to use it: "... however keep in mind that zooming is an important accessibility feature that is used by a lot of people. Turning it off should therefore only happen when really necessary, such as for certain types of games and applications." http://dev.opera.com/articles/view/an-introduction-to-meta-viewport-and-viewport/

这篇关于到“user-scalable=no"或不“user-scalable=no"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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