上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页
摘要: 首先说说我自己对于闭包的理解:闭包就是通过返回一个函数,可以通过这个函数访问局部变量(私有变量);(JavaScript高级程序语言一书中的解释是:闭包是指有权访问另一个函数作用域中的变量的函数。) 我是看了阮一峰的一篇关于闭包的博客(http://www.ruanyifeng.com/blog/2 阅读全文
posted @ 2016-03-08 22:54 Decmber 阅读(651) 评论(0) 推荐(1) 编辑
摘要: 例如lofter导航栏的箭头: 方法:用一个块,宽高设置为0,再设置框的宽度(border)需要箭头向上时候,就设置下边框宽度,其他方向同理,这样便可得到一个箭头形状的小块,再设置颜色位置即可。 <i class="arrow"></i> .arrow{ display:inline-block; 阅读全文
posted @ 2016-03-08 16:22 Decmber 阅读(1150) 评论(0) 推荐(0) 编辑
摘要: overflow属性:visible:声明内容不会被剪裁。比如内容可能被渲染到容器外面。hidden:声明内容将被剪裁,并且也甭想使用滚动条来查看剪裁掉的内容。scroll:声明内容将被剪裁,但有可能出现滚动条来查看被剪裁掉的内容。滚动条出现的位置在inner border adge和outer p 阅读全文
posted @ 2016-03-07 19:32 Decmber 阅读(5009) 评论(0) 推荐(0) 编辑
摘要: Total Accepted: 19397 Total Submissions: 67937 Difficulty: Easy You are playing the following Bulls and Cows game with your friend: You write down a n 阅读全文
posted @ 2016-02-22 13:12 Decmber 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list, determine if it is a palindrome.Follow up:Could you do it in O(n) time and O(1) space?/** * Definition for singly-linked l... 阅读全文
posted @ 2016-01-27 14:28 Decmber 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].Credits:S... 阅读全文
posted @ 2016-01-25 10:06 Decmber 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ... 阅读全文
posted @ 2016-01-16 16:56 Decmber 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 盒子模型: 网页设计中常听的属性名:内容(content)、填充(padding)、边框(border)、边界(margin),CSS盒子模型都具备这些属性,也主要是这些属性。 这些属性我们可以把它转移到我们日常生活中的盒子(箱子)上来理解,日常生活中所见的盒子也就是能装东西的一种箱子,也具有这些属 阅读全文
posted @ 2016-01-16 13:11 Decmber 阅读(640) 评论(0) 推荐(0) 编辑
摘要: 伪元素语法: selector:pseudo-element {property:value;} 1.first-line伪元素:向文本的首行设置特殊格式; 注意: 只能用于块级元素; 可应用于first-line伪元素的属性:font,color,background,word-spacing,l 阅读全文
posted @ 2016-01-16 11:56 Decmber 阅读(3192) 评论(0) 推荐(0) 编辑
摘要: 1.方法一:n&(n-1)=0/** * @param {number} n * @return {boolean} */var isPowerOfTwo = function(n) { if((n>0) && (!(n&(n-1)))){ return true; } ... 阅读全文
posted @ 2016-01-16 11:15 Decmber 阅读(125) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 13 下一页