摘要:
rem 作为一个低调的长度单位,由于手机端网页的兴起,在屏幕适配中得到重用。使用 rem 前端开发者可以很方便的在各种屏幕尺寸下,通过等比缩放的方式达到设计图要求的效果。 rem 的官方定义『The font size of the root element.』,即以根节点的字体大小作为基准值进行长 阅读全文
摘要:
html5新增了一个devicemotion的事件,可以使用手机的重力感应。如下代码所示: window.ondevicemotion = function(event){ var gravity = event.accelerationIncludingGravity; console.log(g 阅读全文