随笔 - 148  文章 - 0  评论 - 3  阅读 - 21万
04 2017 档案
追加window.onload事件
摘要:function addLoadEvent(func){ var oldOnload = window.onload; if(typeof window.onload != 'function'){ window.onload = func; }else{ window.onload = funct 阅读全文
posted @ 2017-04-27 11:46 vsmart 阅读(133) 评论(0) 推荐(0) 编辑
CSS3 文字反序排版
摘要:direction:rtl;unicode-bidi: bidi-override; 阅读全文
posted @ 2017-04-26 16:36 vsmart 阅读(240) 评论(0) 推荐(0) 编辑
js刷新页面方法大全
摘要:如何实现刷新当前页面呢?借助js你将无所不能。 1,reload 方法,该方法强迫浏览器刷新当前页面。语法:location.reload([bForceGet]) 参数: bForceGet, 可选参数, 默认为 false,从客户端缓存里取当前页。true, 则以 GET 方式,从服务端取最新的 阅读全文
posted @ 2017-04-26 09:34 vsmart 阅读(227) 评论(0) 推荐(0) 编辑
canvas时钟
摘要:<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>时钟canvas</title> <script> window.onload = function(){ var oc = document.getEleme 阅读全文
posted @ 2017-04-16 17:59 vsmart 阅读(185) 评论(0) 推荐(0) 编辑
jQuery插件开发模式
摘要:原文:http://www.cnblogs.com/Wayou/p/jquery_plugin_tutorial.html 要说jQuery 最成功的地方,我认为是它的可扩展性吸引了众多开发者为其开发插件,从而建立起了一个生态系统。这好比大公司们争相做平台一样,得平台者得天下。苹果,微软,谷歌等巨头 阅读全文
posted @ 2017-04-13 09:12 vsmart 阅读(133) 评论(0) 推荐(0) 编辑
template
摘要:<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>template</title> <script src="http://hs.3g.cnfol.com/uh/Js/PlugJs/jquery.min.js" 阅读全文
posted @ 2017-04-12 14:43 vsmart 阅读(237) 评论(0) 推荐(0) 编辑
滚动条 滚动到底部加载
摘要:滚动到底部加载的判断条件:滚动高度 + 可视高度 >= 文档高度 jQuery/Zepto写法: $(window).scrollTop() + $(window).height() >= $(document).height() 原生js写法: window.pageYOffset + windo 阅读全文
posted @ 2017-04-11 17:25 vsmart 阅读(223) 评论(0) 推荐(0) 编辑
canvas 鼠标划线
摘要:<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>canvas</title> <style> body{background: #000;} #c1{background: #fff;} </style> < 阅读全文
posted @ 2017-04-11 11:14 vsmart 阅读(208) 评论(0) 推荐(0) 编辑
h5历史管理
摘要:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>h5历史管理</title><script>window.onload = function(){ var odiv = document.querySelector( 阅读全文
posted @ 2017-04-10 14:29 vsmart 阅读(204) 评论(0) 推荐(0) 编辑
JS 随机生成随机数 数组
摘要:function RndNum(n){ var rnd=[]; for(var i=0;i<n;i++) rnd[i] = Math.floor(Math.random()*10); return rnd; } 阅读全文
posted @ 2017-04-10 14:07 vsmart 阅读(1332) 评论(0) 推荐(0) 编辑
你必须知道的28个HTML5特征、窍门和技术
摘要:翻译-你必须知道的28个HTML5特征、窍门和技术 by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=1058 原文地址:http://net…html5-features- 阅读全文
posted @ 2017-04-10 11:44 vsmart 阅读(198) 评论(0) 推荐(0) 编辑
Javascript图片预加载详解
摘要:预加载图片是提高用户体验的一个很好方法。图片预先加载到浏览器中,访问者便可顺利地在你的网站上冲浪,并享受到极快的加载速度。这对图片画廊及图片占据很大比例的网站来说十分有利,它保证了图片快速、无缝地发布,也可帮助用户在浏览你网站内容时获得更好的用户体验。本文将分享三个不同的预加载技术,来增强网站的性能 阅读全文
posted @ 2017-04-10 11:30 vsmart 阅读(751) 评论(0) 推荐(0) 编辑
弹性盒模型
摘要:1,弹性核模型 新版父级display:flex; // 水平 方向 flex-direction:row; // 竖直 方向 flex-direction:colunm; flex-direction: row-reverse; flex-direction: column-reverse; di 阅读全文
posted @ 2017-04-10 11:28 vsmart 阅读(184) 评论(0) 推荐(0) 编辑
利用JSON.parse() 与 JSON.stringify() 实现深拷贝
摘要:var a = { name:'hello' }; var str = JSON.stringify(a); b = JSON.parse(str); b.name = 'hi'; alert(b.name); // 'hi' alert(a.name); // 'hello' 阅读全文
posted @ 2017-04-10 11:16 vsmart 阅读(521) 评论(0) 推荐(0) 编辑
有关android及ios手机 中 input 调出数字键盘
摘要:有关android及ios手机 中 input 调出数字键盘 只需要添加 type="number" pattern="[0-9]*" 属性。 阅读全文
posted @ 2017-04-07 17:16 vsmart 阅读(279) 评论(0) 推荐(0) 编辑
移动端 去除鼠标点击时的外轮廓
摘要:a{ border:none; -webkit-tap-highlight-color: rgba(0,0,0,0); -webkit-tap-highlight-color:transparent; outline:none; } 阅读全文
posted @ 2017-04-07 16:48 vsmart 阅读(160) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示