摘要: function imgLoad(){ var img=new Image(); img.src=url; if(img.complete){ //从缓存中获取 callback(); }else{ img.onload=function(){ //实际加载完成 callback(); } }} 阅读全文
posted @ 2013-01-05 22:25 wcp_spring 阅读(147) 评论(0) 推荐(0)
摘要: CSS中有一个属性叫做clip,为修剪,剪裁之意。利用clip属性达到隐藏页面元素效果:View Code.hidden{ position:absolute; clip: rect(1px 1px 1px 1px); }clip:rect(top right bottom left).clipCss{clip:rect(30px 200px 200px 20px)}如果left >= right或者bottom <= top,则元素会被完全裁掉而不可见,即“隐藏”.clip:rect矩形剪裁只能作用于position:absolute的元素上。应用:img标签下的CSS S... 阅读全文
posted @ 2013-01-05 21:33 wcp_spring 阅读(215) 评论(0) 推荐(0)