会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ning0_o
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
下一页
2016年12月7日
引入其他字体库 和 字体样式设置
摘要: 引入其他字体库, 如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
阅读(204)
评论(0)
推荐(0)
2016年12月6日
onmousemove鼠标截取
摘要: document.onmousemove = function(e) {}document.onmouseup = function(){ this.onmousemove = null;//阻止mousemove执行 this.onmouseup = null;} ...
阅读全文
posted @ 2016-12-06 17:18 ning0_o
阅读(125)
评论(0)
推荐(0)
2016年11月29日
最大、最小值
摘要: 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
阅读(116)
评论(0)
推荐(0)
2016年11月28日
ruby环境sass编译中文出现Syntax error: Invalid GBK character错误解决方法
摘要: 问题描述:sass文件编译时候使用ruby环境,在xp环境中没有任何问题,但是在windows7环境下无论是界面化的koala工具还是命令行模式的都会出现以下错误:Syntax error: Invalid GBK character “\xE5″on line 8 of E:\...
阅读全文
posted @ 2016-11-28 09:41 ning0_o
阅读(119)
评论(0)
推荐(0)
2016年11月24日
时间戳
摘要: 1、获取时间戳的几种方法let timestamp1 = Date.now(); // 1479958919206let timestamp2 = new Date().getTime(); // 1479958919206let timest...
阅读全文
posted @ 2016-11-24 14:26 ning0_o
阅读(145)
评论(0)
推荐(0)
JS性能优化 -- 函数节流
摘要: 一、函数节流的概念、主要用途及意义 概念:函数节流是通过一个定时器,阻断连续重复的函数调用,从而一定程度上优化性能。 用途:主要用于用户界面调用的函数,如:resize、mousemove、keyup事件的监听函数。 这类监听函数的主要特征: 1、短时间内连续多次重复...
阅读全文
posted @ 2016-11-24 11:10 ning0_o
阅读(229)
评论(0)
推荐(0)
2016年11月23日
css兼容问题
摘要: 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
阅读(113)
评论(0)
推荐(0)
上传文件(ajax结合form表单)
摘要: 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
阅读(226)
评论(0)
推荐(0)
文件下载
摘要: 1、form下载2、a标签直接下载
阅读全文
posted @ 2016-11-23 09:45 ning0_o
阅读(131)
评论(0)
推荐(0)
input上传指定类型的文件
摘要: 1、 谷歌–上传文件夹 添加属性webkitdirectory2、 上传文件–限制类型 添加accept属性 视频:video/* 音频:audio/*gif图片:image/gif只允许上传wav(一般用于铃声上传):.wavexcel文件:application/msex...
阅读全文
posted @ 2016-11-23 09:43 ning0_o
阅读(268)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
下一页
公告