摘要: 【10个影响你一生的小改变】1. Walk daily 每天散步2. Wake early 早起3. Eat less 少吃4. Stop watching, start doing 不做旁观者5. Go slowly 放慢脚步6. Declutter 整理7. Drink water 喝水8. Meditate 冥想9. Let go of expectations 不预期10.Live in the moment 活在当下。 阅读全文
posted @ 2013-11-12 12:02 浮生如斯 阅读(215) 评论(0) 推荐(0) 编辑
摘要: js的左右滑动触屏事件,主要有三个事件: touchstart,touchmove,touchend。这三个事件最重要的属性是 pageX和 pageY,表示X,Y坐标。touchstart: 在触摸开始时触发事件touchend: 在触摸结束时触发事件touchmove: 这个事件比较奇怪,按道理在触摸到过程中不断激发这个事件才对,但是在我的 Android 1.5 中,在 touchstart 激发后激发一次,然后剩余的都和 touchend 差不多同时激发。这三个事件都都有一个 timeStamp 的属性,查看 timeStamp 属性,可以看到顺序是 touchstart ->. 阅读全文
posted @ 2013-11-12 09:50 浮生如斯 阅读(4486) 评论(0) 推荐(1) 编辑
摘要: 如果没有在页面标签的style里面显示的设置属性值,那么使用obj.style.属性 会获取不到值,这时候如果需要获取默认值的时候则需要下面的代码帮助获取,以下对IE和其他浏览器做了不同的处理。/** OBJ 需要获取属性的元素,prop 属性名 **/function GetCurrentStyle(obj, prop){ if (obj.currentStyle) //IE { return obj.currentStyle[prop]; } else if (window.getComputedStyle) //非IE ... 阅读全文
posted @ 2013-11-12 09:40 浮生如斯 阅读(436) 评论(0) 推荐(0) 编辑