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.

  • 相关阅读:
    error :expected initializer before
    数字转字符
    转载转载转载指针占几个字节
    转载转载转载
    二维数组1
    响应式布局
    flex布局
    wepy踩坑经历
    css命名规范(转载)
    28.设计模式
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6437258.html
Copyright © 2011-2022 走看看