zoukankan      html  css  js  c++  java
  • Using the viewport meta tag to control layout on mobile browsers

    w

    https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag

    不允许用户单击屏幕放大浏览,使得UI布局的宽度和移动设备的宽度一致,接近原生应用的体验。

    Background

    Mobile browsers like Fennec render pages in a virtual "window" (the viewport), usually wider than the screen, so they don't need to squeeze every page layout into a tiny window (which would break many non-mobile-optimized sites). Users can pan and zoom to see different areas of the page.

    Mobile Safari introduced the "viewport meta tag" to let web developers control the viewport's size and scale. Many other mobile browsers now support this tag, although it is not part of any web standard. Apple's documentation does a good job explaining how web developers can use this tag, but we had to do some detective work to figure out exactly how to implement it in Fennec. For example, Safari's documentation says the content is a "comma-delimited list," but existing browsers and web pages use any mix of commas, semicolons, and spaces as separators.

  • 相关阅读:
    UITextField的总结
    【实战】登录界面
    点分治学习
    2020/3/1
    2020/2/29
    2020/2/28
    2020/2/27
    2020/2/27
    最小树形图
    Ch’s gift HDU6162
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6437258.html
Copyright © 2011-2022 走看看