2014年6月16日

Chrome 的插件(Plug-in)与扩展(Extension)的区别

摘要: "扩展"和"插件",其实都是软件组件的一种形式,Chrome 只不过是把两种类型的组件分别给与了专有名称,一个叫"扩展",另一个叫"插件"。扩展(Extension),指的是通过调用 Chrome 提供的 Chrome API 来扩展浏览器功能的一种组件,工作在浏览器层面,使用 HTML + Jav... 阅读全文

posted @ 2014-06-16 00:06 Sure_Yi 阅读(1785) 评论(0) 推荐(0) 编辑

2014年4月27日

js callback && callback()

摘要: js 中有时会这么写:callback && callback();解释:t's a shorthand conditional.If the left of the&&is truth-y, then whatever is on the right side of the&&is execute... 阅读全文

posted @ 2014-04-27 17:59 Sure_Yi 阅读(1007) 评论(0) 推荐(0) 编辑

2014年4月25日

js the difference between 'return false' and 'return true'

摘要: js回调函数return false 阻止了默认行为;return true 继续执行默认行为;不返回值,是undefined。除了return false,默认行为会正常执行。(下面的默认行为就是post表单)栗子:1.$('form').submit(function(){ alert($(t... 阅读全文

posted @ 2014-04-25 09:52 Sure_Yi 阅读(238) 评论(0) 推荐(0) 编辑

2014年4月23日

css pseudo-class (伪类)checked unchecked

摘要: checkedinput[type="checkbox"]:checked{/* styles */}uncheckedinput[type="checkbox"]:not(:checked){/* styles */}:uncheckeddoes not exist in the level 3 ... 阅读全文

posted @ 2014-04-23 08:55 Sure_Yi 阅读(503) 评论(0) 推荐(0) 编辑

2014年4月22日

js中清空一个数组

摘要: Ways to clear an existing arrayA:Method 1 所有清空方法中速度是最快的,但是实质是新建一个数组。原数组要是没有在别的地方引用或别的地方引用了但是不需要跟着原数组的数值改变而改变,就可以用这种方法A =[]; // A = new Array();This co... 阅读全文

posted @ 2014-04-22 23:18 Sure_Yi 阅读(1152) 评论(0) 推荐(0) 编辑

2014年4月17日

盒子模型 盒子默认宽度

摘要: Margin 它不会影响盒子本身的大小,但是它会影响和盒子有关的其他内容,因此 margin 是盒模型的一个重要的组成部分。盒子本身的大小是这样计算的:Width = width + padding-left + padding-right + border-left + border-rightH... 阅读全文

posted @ 2014-04-17 23:52 Sure_Yi 阅读(956) 评论(0) 推荐(0) 编辑

css background 作用范围

摘要: css中的background是盒子模型中content+padding的区域,padding只有padding-width属性。border有各种样的,除了大小宽度之外,还有颜色也可选。 阅读全文

posted @ 2014-04-17 23:35 Sure_Yi 阅读(769) 评论(0) 推荐(0) 编辑

box model 中的js事件作用域

摘要: 现在开始,我会记录一些web前端的知识和经验总结,这就是一本笔记,我记录,会回过来review,查漏补缺还有改错。我自己测试了一下,发现在盒子模型中,事件比如click的作用域是content、padding、border这三部分组成的区域,至于margin没有测试到事件响应。虽然margin也算盒... 阅读全文

posted @ 2014-04-17 23:29 Sure_Yi 阅读(221) 评论(0) 推荐(0) 编辑

css !important

摘要: !important 简单来说是为了增加css权重的。http://www.w3cplus.com/css/the-important-css-declaration-how-and-when-to-use-it.html 阅读全文

posted @ 2014-04-17 23:08 Sure_Yi 阅读(179) 评论(0) 推荐(0) 编辑

2014年4月11日

WebStorm for mac 快捷键

摘要: 配置:1. 运行于 mac os x2. 苹果键 设置成 control键3. 外接DELL键盘快捷键:Alt + Shift + F 在整个工程中快速查找,也可以选择具体条件快速查找Alt + F 在文件内快速查找Alt + Shift + R 在整个工程中快速替换,也可以选择具体条件快速替换Alt + R 在文件内快速替换Alt + W 关闭当前代码选项卡Alt + D 复制当前行Shift + Enter 重新开始一行(无论光标在哪个位置)Alt + Backspace 删除一行Alt + Shift + A 快速查找并使用编辑器所有功能Alt + Shift + ] / [ 切换代码选 阅读全文

posted @ 2014-04-11 00:27 Sure_Yi 阅读(2282) 评论(0) 推荐(0) 编辑

导航