摘要: display: -webkit-box !important; overflow: hidden; text-overflow: ellipsis; word-break: break-all; -webkit-box-orient: vertical; -webkit-lin... 阅读全文
posted @ 2015-09-22 23:12 小菜鸡12315 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 因为算法比较烂,所以想做一下这方面的积累。尽量能够每天学习一个新算法吧。(不过估计很悬)好吧,今天第一个是字符串转换驼峰直接上代码var str = 'toupper-case'; var arr = str.split('-'); //toupper,case for (var i ... 阅读全文
posted @ 2015-09-21 22:35 小菜鸡12315 阅读(387) 评论(0) 推荐(0) 编辑
摘要: 背景透明,文字不透明 背景透明,文字不透明View Code转载于 http://www.cnblogs.com/PeunZhang/p/4089894.html 阅读全文
posted @ 2015-09-18 00:01 小菜鸡12315 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Douglas Crockford 推荐用鸭子类型 也就是不关注对象是什么。而是关注对象能做什么事情。//鸭式辨型Function isArray(value){ return typeof value.sort() === 'function'; }这种检测依赖一个事实,即数组数据哦唯一包... 阅读全文
posted @ 2015-09-16 10:10 小菜鸡12315 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 什么是自动化先来说说为什么要自动化。凡是要考虑到自动化时,你所做的工作必然是存在很多重复乏味的劳作,很有必要通过程序来完成这些任务。这样一来就可以解放生产力,将更多的精力和时间投入到更多有意义的事情上。随着前端开发不再是简单的作坊式作业,而成为一个复杂的工程时,还涉及到性能优化一系列工作等等,这时自... 阅读全文
posted @ 2015-09-01 19:05 小菜鸡12315 阅读(557) 评论(0) 推荐(0) 编辑
摘要: 1.ruby安装 下载安装包 勾选中间一个2.sass 安装 转换TB镜像$ gem sources --remove https://rubygems.org/$ gem sources -a http://ruby.taobao.org/$ gem sources -l*** CURRENT S... 阅读全文
posted @ 2015-08-13 11:46 小菜鸡12315 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 安装淘宝镜像 npm install cnpm -g --registry=https://registry.npm.taobao.org 1.weinre 用法 可以先用这个命令安装 cnpm -g install weinre 如果不行那么试试下面的方法安装 首先安装java环境 http:// 阅读全文
posted @ 2015-08-11 22:16 小菜鸡12315 阅读(300) 评论(0) 推荐(0) 编辑
摘要: IE6,IE7,IE8,Firefox兼容的css hack补充:color{ background-color: #CC00FF; /*所有浏览器都会显示为紫色*/ background-color: #FF0000\9; /*IE6、IE7、IE8会显示红色*/ *background-col... 阅读全文
posted @ 2015-07-20 22:23 小菜鸡12315 阅读(122) 评论(0) 推荐(0) 编辑
摘要: getBoundingClientRect() 这个方法返回一个矩形对象,包含四个属性:left、top、right和bottom。分别表示元素各边与页面上边和左边的距离。 var box=document.getElementById('box'); // 获取元素 alert(box.getBo 阅读全文
posted @ 2015-06-12 15:56 小菜鸡12315 阅读(2052) 评论(0) 推荐(0) 编辑
摘要: function GetRandomNum(Min,Max){var Range = Max - Min;var Rand = Math.random();return(Min + Math.round(Rand * Range));}var num = GetRandomNum(15,25); 阅读全文
posted @ 2015-06-10 23:13 小菜鸡12315 阅读(168) 评论(0) 推荐(0) 编辑