html5 – 元标记中的初始比例,用户可扩展,最小比例,最大比例属性是什么?

前端之家收集整理的这篇文章主要介绍了html5 – 元标记中的初始比例,用户可扩展,最小比例,最大比例属性是什么?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在浏览一个网站的源代码,并找到这段代码
<Meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=1.0,minimum-scale=1.0,maximum-scale=1.0">

我想知道这个初始规模,用户可扩展性,最小规模,最大规模是什么,这些值是什么意思?并告诉我他们接受的所有价值观。

解决方法

width = device-width

this means we are telling to the browser “my website adapts to your device width”

初始尺度

This define scale the website,This parameter sets the initial zoom level,which means if 1 CSS pixel is equal to 1 view port pixel. This parameter help to when you changing orientation mode,or preventing a default zooming. without this parameter responsive site work.

最大刻度

Maximum-scale define maximum zoom. When you access website top priority is maximum-scale=1 won’t allow the user to zoom.

最小尺度

Minimum-scale define minimum zoom. this work same as above but define minimum scale. If you not define this its work without using this is useful when maximum scale is large and you want to set minimum scale that time you can use.

用户可扩展

User-scalable assign 1.0 means website allow to zoom in or zoom out.

But if you assign User-scalable=no its means website not allow to zoom in or zoom out.

希望这帮助你!

猜你在找的HTML5相关文章