localStorage
在localStorage中存储一个key为test的值: localStorage.setItem('test');
根据某一个值获取对应的值: let res=localStorage.getItem('res')
根据某一值删除对应的值: localStorage.removeItem('res')
移除所有项: localStorage.clear()
监听事件: window.addEventListener('setItemEvent', function(e) { });
CSS3 属性: transform transition will-change
transform transition:
transform
作用: 动画效果
优点: 执行速度 很更快 (模拟使用 GPU渲染)
* translate: 移动
translateX(30px): x 轴 横向移动
translateY(30px): y 轴 竖向移动
translate(x, y): 双向移动
translate3d(x, y, z): 3个轴的方向移动 (伪GPU渲染) z 轴永远设置成 0
* 缩放
给 2: 放大2倍
给 0.5: 缩小一倍
scale(比例)
scale(x, y)
* 旋转 rotate
rotate(角度): 例如 rotate(45deg)