摘要: 标准浏览器在正确的文档声明中获取滚动条的卷去高度应该使用document.documentElement.scrollTop 但是很蛋疼的发现 chrome获取的值始终为0,需使用document.body.scrollTop; 获取滚动条向下滚动的距离可以这样 _scrollTop = docum... 阅读全文
posted @ 2012-08-29 18:13 justlancer 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 这是个是IE8的专用标记,用来指定IE8浏览器去模拟某个特定版本的IE浏览器的渲染方式(本人测试IE6不行),以此来解决部分兼容问题,例如模拟IE7的具体方式如下:但令我好奇的是,此处这个标记后面竟然出现了chrome这样的值,难道IE也可以模拟chrome了?迅速搜索了一下,才明白原来不是微软增... 阅读全文
posted @ 2012-08-23 11:08 justlancer 阅读(401) 评论(0) 推荐(0) 编辑
摘要: 无标题文档 阅读全文
posted @ 2012-08-14 14:39 justlancer 阅读(344) 评论(0) 推荐(0) 编辑
摘要: http://www.lesscss.net/http://www.cssk8.com/html/css_Tutorial/201101/22-2570.html#twohttp://www.zhangxinxu.com/wordpress/?p=1565 阅读全文
posted @ 2012-08-09 11:55 justlancer 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 不废话!offsetTop 相当于elem.style.top 区别在于1 offsetTop只读 2elem.style.top只能读style=" top:数值"; 3 offsetTop返回数值 elelm.style.top返回 带"px"字符串。用处: 读取 left top;offsetLeft同上offsetWidth offsetHeight读取元素所占尺寸包含滚动条不算marginclientWidth clientHeight 内容区域大小 算paddingscrollHeight scrollWidht 滚动区域整体大小scroll 阅读全文
posted @ 2012-07-30 19:49 justlancer 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 一般获取图片大小的方法 var imgload = function(url,callback){ var img = new Image(); img.src = url; if(img.complete){ callback(img.width,img.height) }else{ img.o... 阅读全文
posted @ 2012-07-20 14:44 justlancer 阅读(533) 评论(0) 推荐(0) 编辑
摘要: IE6是不支持position:fixed的,可以使用CSS表达式expression来解决! 先粘贴代码 DOCTYPE html> html> head> meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> ... 阅读全文
posted @ 2012-07-19 14:32 justlancer 阅读(184) 评论(0) 推荐(0) 编辑