HTML5 Boilerplate: Meta viewport and width=device-width

后端 未结 5 1323
长情又很酷
长情又很酷 2020-12-23 14:15

I\'m building an adaptive/responsive website.

Regarding this recent change to the HTML5BP:

\"mobile/iOS css revisions\"

I\'ve started using:

5条回答
  •  死守一世寂寞
    2020-12-23 14:44

    I found Mozilla's viewport explanation the most detailed and helpful. Here's a excerpt:

    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

提交回复
热议问题