摘要: 引入其他字体库, 如Open Sans,先下载Open Sans字体http://pan.baidu.com/s/1c1S8ZC0@font-face { font-family: 'Open Sans'; /* 为导入的字体命名(自定义),方便以后使用 */ src: ... 阅读全文
posted @ 2016-12-07 11:08 ning0_o 阅读(177) 评论(0) 推荐(0) 编辑
摘要: document.onmousemove = function(e) {}document.onmouseup = function(){ this.onmousemove = null;//阻止mousemove执行 this.onmouseup = null;} ... 阅读全文
posted @ 2016-12-06 17:18 ning0_o 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1、一串数中最大、最小值Math.max(10, 5, 2, 9); // 10Math.min(10, 5, 2, 9); // 22、数组中的最大、最小值Math.max.apply(null, [10, 5, 2, 9]); // 10Math.min.apply(null, ... 阅读全文
posted @ 2016-11-29 16:42 ning0_o 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 问题描述:sass文件编译时候使用ruby环境,在xp环境中没有任何问题,但是在windows7环境下无论是界面化的koala工具还是命令行模式的都会出现以下错误:Syntax error: Invalid GBK character “\xE5″on line 8 of E:\... 阅读全文
posted @ 2016-11-28 09:41 ning0_o 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 1、获取时间戳的几种方法let timestamp1 = Date.now(); // 1479958919206let timestamp2 = new Date().getTime(); // 1479958919206let timest... 阅读全文
posted @ 2016-11-24 14:26 ning0_o 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 一、函数节流的概念、主要用途及意义 概念:函数节流是通过一个定时器,阻断连续重复的函数调用,从而一定程度上优化性能。 用途:主要用于用户界面调用的函数,如:resize、mousemove、keyup事件的监听函数。 这类监听函数的主要特征: 1、短时间内连续多次重复... 阅读全文
posted @ 2016-11-24 11:10 ning0_o 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Aanimation @keyframes动画 谷歌 低版本(4.0~43.0)-webkit- 火狐 低版本 (5.0~16.0) -moz- IE9- 不支持 解决方法: 使用jquery的animate动画 $(ele).animate({style}... 阅读全文
posted @ 2016-11-23 16:15 ning0_o 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1、 form直接提交 2、ajax提交// 点击确认,提交var formData = new FormData();formData.append('file', $('input[type=file]')[0].files[0]); ... 阅读全文
posted @ 2016-11-23 10:19 ning0_o 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 1、form下载2、a标签直接下载 阅读全文
posted @ 2016-11-23 09:45 ning0_o 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 1、 谷歌–上传文件夹 添加属性webkitdirectory2、 上传文件–限制类型 添加accept属性 视频:video/* 音频:audio/*gif图片:image/gif只允许上传wav(一般用于铃声上传):.wavexcel文件:application/msex... 阅读全文
posted @ 2016-11-23 09:43 ning0_o 阅读(249) 评论(0) 推荐(0) 编辑