2013年7月9日
摘要: 根据元素相对位置来控制滚动条http://jsbin.com/ebudaf/2其中用到了Element.prototype.scrollIntoViewIfNeeded代码如下: Element.prototype.scrollIntoViewIfNeeded = function (centerIfNeeded) { centerIfNeeded = arguments.length === 0 ? true : !!centerIfNeeded; var parent = this.parentNode, parentComputedStyle = window.... 阅读全文
posted @ 2013-07-09 21:59 爱的鲁鲁修 阅读(464) 评论(0) 推荐(0) 编辑