摘要: offsetX/offsetY:相对于当前元素的位移x/y:相对于当前座标系的位移,但是IE常常搞错当前座标系layerX/layerY:相对于当前座标系的位移pageX/pageY:相对于网页的位移clientX/clientY:相对于可视窗口的位移screenX/screenY:相对于屏幕的位移... 阅读全文
posted @ 2014-11-25 15:30 zlz~ling 阅读(404) 评论(0) 推荐(0) 编辑
摘要: $ git clone https://github.com/YajunWu/lebang.git 从别处复制项目下经常用到的命令:$ cd /D/lebang 进入工作目录$ git pull 项目合作的时候 将远程代码拉到本地来 $ git status 显示工作目录下文件的状态$ git ... 阅读全文
posted @ 2014-11-13 19:59 zlz~ling 阅读(171) 评论(0) 推荐(0) 编辑
摘要: (1)对于同一级的两个块,如果我们要使几个块可以在同一个水平线上排开,则这几个同一级的块要同时设置浮动float:left或者同时设置内联元素display:inline-block;(如果同一级的块只有有一些设置了浮动一些没有设置浮动那么这些块很有可能会相互叠在一起); 1.1同一级的块同时设置浮... 阅读全文
posted @ 2014-11-13 16:48 zlz~ling 阅读(971) 评论(0) 推荐(0) 编辑
摘要: 常用:JS 获取浏览器窗口大小// 获取窗口宽度if(windows.innerWidth)winWidth = windows.innerWidth;elseif((document.body) && (document.body.clientWidth))winWidth = document.... 阅读全文
posted @ 2014-11-13 10:28 zlz~ling 阅读(362) 评论(0) 推荐(0) 编辑
摘要: ☆☆☆☆☆ 阅读全文
posted @ 2014-11-11 16:58 zlz~ling 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 一、关于块级作用域 说到JavaScript的变量作用域,与咱们平时使用的类C语言不同.例如C#中下面代码:static void Main(string[] args){ if(true) { int num = 10; } System.Console.WriteLine(num);}这段代码如... 阅读全文
posted @ 2014-11-11 16:51 zlz~ling 阅读(139) 评论(0) 推荐(0) 编辑
摘要: GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1]... 阅读全文
posted @ 2014-10-27 14:56 zlz~ling 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IIISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the... 阅读全文
posted @ 2014-10-26 22:05 zlz~ling 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell Stock IISay you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the ... 阅读全文
posted @ 2014-10-23 11:45 zlz~ling 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Best Time to Buy and Sell StockSay you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to compl... 阅读全文
posted @ 2014-10-22 20:39 zlz~ling 阅读(130) 评论(0) 推荐(0) 编辑