会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
justlancer
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
2012年8月29日
关于Chrome 对document.documentElement.scrollTop 的兼容问题
摘要: 标准浏览器在正确的文档声明中获取滚动条的卷去高度应该使用document.documentElement.scrollTop 但是很蛋疼的发现 chrome获取的值始终为0,需使用document.body.scrollTop; 获取滚动条向下滚动的距离可以这样 _scrollTop = docum...
阅读全文
posted @ 2012-08-29 18:13 justlancer
阅读(274)
评论(0)
推荐(0)
2012年8月23日
< meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />
摘要: 这是个是IE8的专用标记,用来指定IE8浏览器去模拟某个特定版本的IE浏览器的渲染方式(本人测试IE6不行),以此来解决部分兼容问题,例如模拟IE7的具体方式如下:但令我好奇的是,此处这个标记后面竟然出现了chrome这样的值,难道IE也可以模拟chrome了?迅速搜索了一下,才明白原来不是微软增...
阅读全文
posted @ 2012-08-23 11:08 justlancer
阅读(415)
评论(0)
推荐(0)
2012年8月14日
纯CSS实现侧边栏/分栏高度自动相等
摘要: 无标题文档
阅读全文
posted @ 2012-08-14 14:39 justlancer
阅读(348)
评论(0)
推荐(0)
2012年8月9日
临时网页收藏
摘要: 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
阅读(144)
评论(0)
推荐(0)
2012年7月30日
尺寸
摘要: 不废话!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
阅读(148)
评论(0)
推荐(0)
2012年7月20日
图片预加载之比onload更快的获取图片尺寸
摘要: 一般获取图片大小的方法 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
阅读(558)
评论(0)
推荐(0)
2012年7月19日
最完美修正IE6position:fixed的BUG
摘要: 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
阅读(190)
评论(0)
推荐(0)
上一页
1
2
公告