# 移动端开发总结（1）

##### 常用单位

rem

[MDN]This unit represents the font-size of the root element.

em

[MDN]This unit represents the calculated font-size of the element. If used on the font-size property itself, it represents the inherited font-size of the element.

vw、vh

[MDN]vw:1/100th of the height of the viewport.
[MDN]vh:1/100th of the width of the viewport.
[MDN]vmin:1/100th of the minimum value between the height and the width of the viewport.
[MDN]vmax:1/100th of the maximum value between the height and the width of the viewport.
vw、vh相对于屏幕的百分比，1vw是屏幕宽度的1%，1vh是屏幕高度的1%，由于屏幕是固定的，所以设置的百分比也是固定的。

##### 改变viewport

附录一js常用获取屏幕信息