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

    A typical mobile-optimized site contains something like the following:

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

    The width property controls the size of the viewport. It can be set to a specific number of pixels like width=600 or to the special value device-width value which is the width of the screen in CSS pixels at a scale of 100%. (There are corresponding height and device-height values, which may be useful for pages with elements that change size or position based on the viewport height.)

    The initial-scale property controls the zoom level when the page is first loaded. The maximum-scale, minimum-scale, and user-scalable properties control how users are allowed to zoom the page in or out.

  • 相关阅读:
    CSS-16-margin值重叠问题
    CSS-15-定位
    CSS-14-浮动
    CSS-13-块级元素和行内元素
    CSS-12-盒子模型
    CSS-11-外边距
    CSS-10-内边距
    CSS-09-背景属性
    CSS-08-边框属性设置
    CSS-07-CSS文本设置
  • 原文地址:https://www.cnblogs.com/weekend001/p/3745553.html
Copyright © 2011-2022 走看看