首页 > 代码库 > 详解 <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

详解 <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

一次面试被要求详解  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
 
 
content属性值 :
     width:可视区域的宽度,值可为数字或关键词device-width
     height:同width
     intial-scale:页面首次被显示是可视区域的缩放级别,取值1.0则页面按实际尺寸显示,无任何缩放
     maximum-scale=1.0, minimum-scale=1.0;可视区域的缩放级别,
              maximum-scale用户可将页面放大的程序,1.0将禁止用户放大到实际尺寸之上。
     user-scalable:是否可对页面进行缩放,no 禁止缩放

详解 <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">